We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c3e5d8 commit c73e94bCopy full SHA for c73e94b
libr/cons/grep.c
@@ -1202,9 +1202,9 @@ R_API int r_cons_grep_line(char *buf, int len) {
1202
if (use_tok && grep->tokens_count > 0) {
1203
// dynamic tokens selection: pick only specified columns
1204
char *save_ptr2 = NULL;
1205
- size_t tok_idx = 0;
+ size_t k, tok_idx = 0;
1206
while ((tok = r_str_tok_r (tok_idx? NULL: in, delims, &save_ptr2))) {
1207
- for (size_t k = 0; k < grep->tokens_count; k++) {
+ for (k = 0; k < grep->tokens_count; k++) {
1208
if ((size_t)grep->tokens[k] == tok_idx) {
1209
const size_t toklen = strlen (tok);
1210
memcpy (out + outlen, tok, toklen);
0 commit comments