diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-21 09:53:57 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-10-23 13:12:55 +0200 |
commit | 8396cce9b5d9a4e3cdccc558eb1b818460f0987a (patch) | |
tree | c573d21f50405516245cbfc11630c589a098a855 /basegfx | |
parent | 763114f8b7a7705e1b28226da33bf00016ad7982 (diff) |
clean up places accessing the NULL at the of an OUString
There were only a couple of real bugs fixed, but we're a little
bit safer now.
This also fixes the assert and the comment in OUString::operator[]
about this.
Change-Id: Ibe16b5794e0ba7ecd345fa0801586d25b015974c
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/source/polygon/b2dsvgpolypolygon.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx index ffb04913076e..d9b869b248b8 100644 --- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx +++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx @@ -88,24 +88,28 @@ namespace basegfx { if (sal_Unicode('.') == aChar) separator_seen = true; sNumberString.append(rStr[io_rPos]); - aChar = rStr[++io_rPos]; + io_rPos++; + aChar = io_rPos < rStr.getLength() ? rStr[io_rPos] : 0; } if(sal_Unicode('e') == aChar || sal_Unicode('E') == aChar) { sNumberString.append(rStr[io_rPos]); - aChar = rStr[++io_rPos]; + io_rPos++; + aChar = io_rPos < rStr.getLength() ? rStr[io_rPos] : 0; if(sal_Unicode('+') == aChar || sal_Unicode('-') == aChar) { sNumberString.append(rStr[io_rPos]); - aChar = rStr[++io_rPos]; + io_rPos++; + aChar = io_rPos < rStr.getLength() ? rStr[io_rPos] : 0; } while(sal_Unicode('0') <= aChar && sal_Unicode('9') >= aChar) { sNumberString.append(rStr[io_rPos]); - aChar = rStr[++io_rPos]; + io_rPos++; + aChar = io_rPos < rStr.getLength() ? rStr[io_rPos] : 0; } } |