summaryrefslogtreecommitdiff
path: root/Build/source/libs/poppler/poppler-src/fofi/FoFiIdentifier.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/poppler/poppler-src/fofi/FoFiIdentifier.cc')
-rw-r--r--Build/source/libs/poppler/poppler-src/fofi/FoFiIdentifier.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/Build/source/libs/poppler/poppler-src/fofi/FoFiIdentifier.cc b/Build/source/libs/poppler/poppler-src/fofi/FoFiIdentifier.cc
index 3d41145b15d..ffe9c47c742 100644
--- a/Build/source/libs/poppler/poppler-src/fofi/FoFiIdentifier.cc
+++ b/Build/source/libs/poppler/poppler-src/fofi/FoFiIdentifier.cc
@@ -378,13 +378,12 @@ GBool StreamReader::getUVarBE(int pos, int size, Guint *val) {
}
GBool StreamReader::cmp(int pos, const char *s) {
- int n;
-
- n = (int)strlen(s);
+ const int n = (int)strlen(s);
if (!fillBuf(pos, n)) {
return gFalse;
}
- return !memcmp(buf - bufPos + pos, s, n);
+ const int posDiff = pos - bufPos;
+ return !memcmp(buf + posDiff, s, n);
}
GBool StreamReader::fillBuf(int pos, int len) {