diff options
author | Filippos Karapetis | 2016-12-21 01:15:30 +0200 |
---|---|---|
committer | Colin Snover | 2017-01-06 13:13:21 -0600 |
commit | d9b2b7d484b5dda3dad91aef20da425897698b84 (patch) | |
tree | 399673a825f4162bcbd403b29eb639176d4539a9 /engines | |
parent | 0aba92b4b026f8e3d7849f57926d7c559d7bc52b (diff) | |
download | scummvm-rg350-d9b2b7d484b5dda3dad91aef20da425897698b84.tar.gz scummvm-rg350-d9b2b7d484b5dda3dad91aef20da425897698b84.tar.bz2 scummvm-rg350-d9b2b7d484b5dda3dad91aef20da425897698b84.zip |
SCI32: Fix a subtle bug in SciArray::trim()
With this bug, whenever a string was trimmed from the right, the last
character was always cut off, even if it wasn't whitespace. This was
apparent in the RAMA demo, which parses a text file for its scenes,
and each line is trimmed
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/segment.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h index 538f31170d..81be9332c2 100644 --- a/engines/sci/engine/segment.h +++ b/engines/sci/engine/segment.h @@ -810,9 +810,9 @@ public: if (flags & kArrayTrimRight) { source = data + strlen((char *)data) - 1; while (source > data && *source != showChar && *source <= kWhitespaceBoundary) { + *source = '\0'; --source; } - *source = '\0'; } if (flags & kArrayTrimCenter) { |