Commit 03e5f5cc authored by deuce's avatar deuce
Browse files

No, the well-named strlen variable does not include the NULL terminator

Mr. Smarty Pants.
parent 1bf13e1f
......@@ -2468,7 +2468,7 @@ js_internal_charfunc(JSContext *cx, uintN argc, jsval *arglist, char *(*func)(ch
if(extra_bytes) {
rastr=realloc(str, strlen+extra_bytes);
rastr=realloc(str, strlen+extra_bytes+1 /* for terminator */);
return JS_TRUE;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment