negative index numbers now return ""

for now, a warning is printed, if that happens

DOCREF at
This commit is contained in:
ac-stef
2017-06-15 01:19:34 +02:00
parent 0b2079660a
commit 43aea343ad
+2
View File
@@ -1207,6 +1207,8 @@ COMMANDF(looplisti, "sss", (char *list, char *varlist, char *body) { looplist(li
char *indexlist(const char *s, int pos)
{
DEBUGCODE(if(pos < 0) conoutf("\f3warning: negative index for 'at' \"%s\" %d", s, pos);) // FIXME remove this warning before release
if(pos < 0) return newstring("");
whitespaceskip;
loopi(pos)
{