Skip to content

Commit

Permalink
Fix off-by-one in lexpad extension that caused KnowHOW to overwrite G…
Browse files Browse the repository at this point in the history
…LOBAL
  • Loading branch information
sorear committed Nov 6, 2011
1 parent 8763433 commit f9e1bb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/runtime/Runtime/Lexpad.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function makeLexpad ()
SlotMapping[k] = v;
end
for k,v in ipairs(Names) do
SlotMapping[v] = self.Storage.Count + k - 1;
SlotMapping[v] = self.Storage.Count + k;
end
self.SlotMapping = SlotMapping;
local new = self.Storage.Count + #Names;
Expand All @@ -37,4 +37,4 @@ function makeLexpad ()
end
return Lexpad;
end
Lexpad = makeLexpad();
Lexpad = makeLexpad();

0 comments on commit f9e1bb5

Please sign in to comment.