summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bfstd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/bfstd.c b/src/bfstd.c
index 61d2fee..c858910 100644
--- a/src/bfstd.c
+++ b/src/bfstd.c
@@ -724,10 +724,9 @@ static char *dollar_quote(char *dest, char *end, const char *str, size_t len, en
safe = xiswprint(wc, flags);
}
- for (size_t j = start; j < i; ++j) {
+ for (size_t j = start; safe && j < i; ++j) {
if (str[j] == '\'' || str[j] == '\\') {
safe = false;
- break;
}
}