~timfelgentreff/stratagus/ButtonCheckUnitsNot

« back to all changes in this revision

Viewing changes to src/stratagus/selection.cpp

  • Committer: Tim Felgentreff
  • Date: 2013-04-30 18:36:53 UTC
  • mfrom: (8696.1.23 stratagus)
  • Revision ID: timfelgentreff@gmail.com-20130430183653-067czvt3h0x94x6x
mergeĀ lp:stratagus

Show diffs side-by-side

added added

removed removed

Lines of Context:
1080
1080
        NumSelected = LuaToNumber(l, 1);
1081
1081
        const int args = lua_rawlen(l, 2);
1082
1082
        for (int j = 0; j < args; ++j) {
1083
 
                lua_rawgeti(l, 2, j + 1);
1084
 
                const char *str = LuaToString(l, -1);
1085
 
                lua_pop(l, 1);
 
1083
                const char *str = LuaToString(l, 2, j + 1);
1086
1084
                Selected[j] = &UnitManager.GetSlotUnit(strtol(str + 1, NULL, 16));
1087
1085
        }
1088
1086
        return 0;