Skip to content

Commit

Permalink
Don't let negative into string.rep
Browse files Browse the repository at this point in the history
  • Loading branch information
thegrb93 authored and thegrb93 committed Jul 23, 2019
1 parent 36c4023 commit c4f5304
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/entities/gmod_wire_expression2/core/string.lua
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ end)

registerFunction("repeat", "s:n", "s", function(self,args)
local op1, op2 = args[2], args[3]
local rv1, rv2 = op1[1](self, op1),op2[1](self, op2)
local rv1, rv2 = op1[1](self, op1), math.abs(op2[1](self, op2))
self.prf = self.prf + #rv1 * rv2 * 0.01
return rv1:rep(rv2)
end)
Expand Down

0 comments on commit c4f5304

Please sign in to comment.