Skip to content

Commit

Permalink
fixp
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaozg committed Oct 10, 2024
1 parent f558a1a commit 2fb71b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ static int luv_utf16_to_wtf8(lua_State *L) {
memcpy(ws, utf16, sz);
ws[sz/2] = 0;
sz = uv_utf16_length_as_wtf8(utf16, utf16_len);
char *wtf8 = malloc(sz + 1);
wtf8 = malloc(sz + 1);
if (wtf8 == NULL) return luaL_error(L, "failed to allocate %zu bytes", sz + 1);
ret = uv_utf16_to_wtf8(ws, utf16_len+1, &wtf8, &sz);
if (ret == 0) {
Expand Down

0 comments on commit 2fb71b8

Please sign in to comment.