Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix nargs usage in builtin substr const evaluation

(it was working anyway because of array evaluated as int)
  • Loading branch information...
commit 94ebe0610f229704ed46f37477330333efa169ff 1 parent d173aa7
@NotFound authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  winxedst1.winxed
  2. +1 −1  winxedst2.winxed
View
2  winxedst1.winxed
@@ -1392,7 +1392,7 @@ function builtineval_substr(var owner, var start, var args)
string str = string_from_literal(argstr);
int pos = int_from_literal(argpos);
string result;
- if (args > 2) {
+ if (nargs > 2) {
var arglen = args[2].arg;
int len = int_from_literal(arglen);
result = substr(str, pos, len);
View
2  winxedst2.winxed
@@ -1620,7 +1620,7 @@ function builtineval_substr(var owner, var start, var args)
string str = string_from_literal(argstr);
int pos = int_from_literal(argpos);
string result;
- if (args > 2) {
+ if (nargs > 2) {
var arglen = args[2].arg;
int len = int_from_literal(arglen);
result = substr(str, pos, len);
Please sign in to comment.
Something went wrong with that request. Please try again.