diff options
author | Nicolas 'Pixel' Noble <pixel@nobis-crew.org> | 2013-01-20 00:09:12 -0800 |
---|---|---|
committer | Nicolas 'Pixel' Noble <pixel@nobis-crew.org> | 2013-01-20 00:09:12 -0800 |
commit | 71aba2fccba167f7c402f5f603e6f980b709b07e (patch) | |
tree | 303892153e72fe9873da8e73dd1218318a8f9f7a /src | |
parent | 50693a26b73bd2ad0c3d3a0854c855a6686c1344 (diff) |
Fun that this was wrong all along, and that only 64 bits compilation managed to catch it.
Diffstat (limited to 'src')
-rw-r--r-- | src/BString.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/BString.cc b/src/BString.cc index 74bc7d9..bf7b4e3 100644 --- a/src/BString.cc +++ b/src/BString.cc @@ -53,6 +53,9 @@ Balau::String & Balau::String::do_rtrim() { unsigned int i, l = length(), p = l; const char * buffer = data(); + if (l == 0) + return *this; + for (i = l - 1; i > 0; i--) if (isspace(buffer[i])) p--; |