2014-11-07 22:42:44 (UTC-02:00)
Marcel Rodrigues <marcelgmr@gmail.com>
Fix search string polution.
diff --git a/rover.c b/rover.c index ce46f51..97e0f21 100644 --- a/rover.c +++ b/rover.c @@ -336,8 +336,10 @@ main() } break; default: - if (length < SEARCHSZ - 2) + if (length < SEARCHSZ - 2) { SEARCH[length++] = ch; + SEARCH[length+1] = '\0'; + } } if (length) { for (sel = 0; sel < rover.nfiles; sel++)