diff options
| author | Simon Tatham <anakin@pobox.com> | 2012-05-04 17:37:24 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2012-05-04 17:37:24 +0000 |
| commit | 8c69083e9d9358e9c4ae6bed1c4a69af94b78796 (patch) | |
| tree | 57f639f0b59ddc2c3d9a65895ec1f6ed1dd4160f /bk_text.c | |
| parent | c948dd6dfa23215fca4dbb76d62c2aec803e3b74 (diff) | |
| download | halibut-8c69083e9d9358e9c4ae6bed1c4a69af94b78796.zip halibut-8c69083e9d9358e9c4ae6bed1c4a69af94b78796.tar.gz halibut-8c69083e9d9358e9c4ae6bed1c4a69af94b78796.tar.bz2 halibut-8c69083e9d9358e9c4ae6bed1c4a69af94b78796.tar.xz | |
Now that you can specify negative indents in Halibut text mode, it's
possible to specify an indent which is _overall_ negative, i.e.
intended to be off the left-hand side of the text file. There's no
nice way to handle this, but printing O(2^32) spaces in a while (n--)
loop is particularly bad. Fix the loop to read while (n-- > 0), so
that at least it doesn't get _that_ badly confused.
[originally from svn r9491]
Diffstat (limited to 'bk_text.c')
| -rw-r--r-- | bk_text.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -497,7 +497,7 @@ static void text_output_many(textfile *tf, int n, wchar_t c) wchar_t s[2]; s[0] = c; s[1] = L'\0'; - while (n--) + while (n-- > 0) text_output(tf, s); } |