diff options
Diffstat (limited to 'lstring.c')
| -rw-r--r-- | lstring.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -68,7 +68,7 @@ static TString *newlstr (lua_State *L, const char *str, size_t l, lu_hash h) { | |||
| 68 | 68 | ||
| 69 | TString *luaS_newlstr (lua_State *L, const char *str, size_t l) { | 69 | TString *luaS_newlstr (lua_State *L, const char *str, size_t l) { |
| 70 | TString *ts; | 70 | TString *ts; |
| 71 | lu_hash h = l; /* seed */ | 71 | lu_hash h = (lu_hash)l; /* seed */ |
| 72 | size_t step = (l>>5)+1; /* if string is too long, don't hash all its chars */ | 72 | size_t step = (l>>5)+1; /* if string is too long, don't hash all its chars */ |
| 73 | size_t l1; | 73 | size_t l1; |
| 74 | for (l1=l; l1>=step; l1-=step) /* compute hash */ | 74 | for (l1=l; l1>=step; l1-=step) /* compute hash */ |
