Quote:
Originally Posted by deathkilla
Code:
L 08/02/2012 - 141:59: [SM] Plugin encountered error 15: Array index is out of bounds
L 08/02/2012 - 141:59: [SM] Displaying call stack trace for plugin "webshortcuts.smx":
L 08/02/2012 - 141:59: [SM] [0] Line 57, webshortcuts.sp::OnSay()
|
Quote:
Originally Posted by deathkilla
It was a general question, which could be answered by others. It was not directly towards sslice who has been offline for ages. There is more than 1 coder out there...
|
It's kind of obvious what the problem is - the array is being accessed out of bounds. More specifically if no arguments are given in the
say command callback then, in the code:
Code:
GetCmdArgString(text, sizeof(text));
new len = strlen(text);
len will equal zero, so
text[len-1], on line 57, will try to access
text[-1] which is out of bounds. To fix this the callback needs to bug out if
GetCmdArgString returns less than one.
__________________