make write cstring as c-string.

This commit is contained in:
anod221 2018-08-30 14:21:11 +08:00 committed by GitHub
parent f6931eff46
commit a93d10271d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -776,7 +776,7 @@ static int lbytearr_writestr( lua_State *L )
const char *pstr = lua_tostring(L, 2);
uint8_t *str = &getBuffer(p)[getPosition(p)];
size_t l = 1 + lua_objlen(L, 2);
size_t l = 1 + strlen(pstr);
handle_scope_except();