We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51d0216 commit 7c24e9aCopy full SHA for 7c24e9a
luzer/fuzzed_data_provider.cc
@@ -62,13 +62,10 @@ luaL_consume_strings(lua_State *L)
62
size_t count = luaL_checkinteger(L, 2);
63
size_t max_length = luaL_checkinteger(L, 3);
64
65
- std::string str;
66
- const char *cstr;
67
-
68
lua_newtable(L);
69
for (int i = 1; i <= (int)count; i++) {
70
- str = lfdp->fdp->ConsumeRandomLengthString(max_length);
71
- cstr = str.c_str();
+ std::string str = lfdp->fdp->ConsumeRandomLengthString(max_length);
+ const char *cstr = str.c_str();
72
lua_pushnumber(L, i);
73
lua_pushlstring(L, cstr, str.length());
74
lua_settable(L, -3);
0 commit comments