summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2008-03-14 20:29:53 +0100
committerAlbert Astals Cid <aacid@kde.org>2008-03-14 20:29:53 +0100
commitc65a66a82259f547927cbb918611bcf4a8e264b2 (patch)
tree2f9f059c90f8ac09a0a2e783f834d6fde5e6ce02
parentbd2272f3079319d1c05ca93f7fb6eb0a5370b938 (diff)
xx0 is non exclusive so that should be < not <=
Fixes several warnings about writes on bad places
-rw-r--r--splash/SplashXPathScanner.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/splash/SplashXPathScanner.cc b/splash/SplashXPathScanner.cc
index 99a0ce87..6fc7ce75 100644
--- a/splash/SplashXPathScanner.cc
+++ b/splash/SplashXPathScanner.cc
@@ -397,7 +397,7 @@ void SplashXPathScanner::clipAALine(SplashBitmap *aaBuf,
for (; xx + 7 <= xx0; xx += 8) {
*p++ = 0x00;
}
- if (xx <= xx0) {
+ if (xx < xx0) {
*p &= 0xff >> (xx0 & 7);
}
}
@@ -406,6 +406,7 @@ void SplashXPathScanner::clipAALine(SplashBitmap *aaBuf,
}
}
xx0 = (*x1 + 1) * splashAASize;
+ if (xx0 > aaBuf->getWidth()) xx0 = aaBuf->getWidth();
// set [xx, xx0) to 0
if (xx < xx0) {
p = aaBuf->getDataPtr() + yy * aaBuf->getRowSize() + (xx >> 3);
@@ -420,7 +421,7 @@ void SplashXPathScanner::clipAALine(SplashBitmap *aaBuf,
for (; xx + 7 <= xx0; xx += 8) {
*p++ = 0x00;
}
- if (xx <= xx0) {
+ if (xx < xx0) {
*p &= 0xff >> (xx0 & 7);
}
}