aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbb/lineedit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 0ec9baa5f..95f92aa75 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -1317,7 +1317,11 @@ static NOINLINE void input_tab(smallint *lastWasTab)
1317 /* save tail */ 1317 /* save tail */
1318 strcpy(match_buf, &command_ps[cursor]); 1318 strcpy(match_buf, &command_ps[cursor]);
1319 /* add match and tail */ 1319 /* add match and tail */
1320#if ENABLE_PLATFORM_MINGW32
1321 sprintf(&command_ps[cursor-match_pfx_len], "%s%s", chosen_match, match_buf);
1322#else
1320 sprintf(&command_ps[cursor], "%s%s", chosen_match + match_pfx_len, match_buf); 1323 sprintf(&command_ps[cursor], "%s%s", chosen_match + match_pfx_len, match_buf);
1324#endif
1321 command_len = strlen(command_ps); 1325 command_len = strlen(command_ps);
1322 /* new pos */ 1326 /* new pos */
1323 pos = cursor + len_found - match_pfx_len; 1327 pos = cursor + len_found - match_pfx_len;