Skip to content

Commit 9084552

Browse files
authored
Fix for performance regression (PR #4218, Fixes #4209)
Lua string hash calculation fix
1 parent 794ae47 commit 9084552

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vendor/lua/src/lstring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Udata *luaS_newudata (lua_State *L, size_t s, Table *e) {
107107

108108
LUALIB_API unsigned int luaS_hash(const char *str, size_t l)
109109
{
110-
if (!str || str[0] == '\0' || l == 0)
110+
if (!str || l == 0)
111111
return 0;
112112

113113
unsigned int h = cast(unsigned int, l); /* seed */

0 commit comments

Comments
 (0)