[poppler] goo/gfile.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Sat Mar 22 09:36:25 PDT 2014
goo/gfile.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 37ad83d69bd1d10da6ea1eb559c4bd320917ae25
Author: Albert Astals Cid <aacid at kde.org>
Date: Sat Mar 22 17:33:55 2014 +0100
Reorder the if check condition
I think the previous condition was correct anyway because of the extra -1 in the i check
but it really makes more sense to have the i check first
Bug #76478
diff --git a/goo/gfile.cc b/goo/gfile.cc
index 44beddd..6fd4cba 100644
--- a/goo/gfile.cc
+++ b/goo/gfile.cc
@@ -19,7 +19,7 @@
// Copyright (C) 2006 Kristian Høgsberg <krh at redhat.com>
// Copyright (C) 2008 Adam Batkin <adam at batkin.net>
// Copyright (C) 2008, 2010, 2012, 2013 Hib Eris <hib at hiberis.nl>
-// Copyright (C) 2009, 2012 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2009, 2012, 2014 Albert Astals Cid <aacid at kde.org>
// Copyright (C) 2009 Kovid Goyal <kovid at kovidgoyal.net>
// Copyright (C) 2013 Adam Reichold <adamreichold at myopera.com>
// Copyright (C) 2013 Adrian Johnson <ajohnson at redneon.com>
@@ -492,7 +492,7 @@ FILE *openFile(const char *path, const char *mode) {
}
}
wPath[i] = (wchar_t)0;
- for (i = 0; mode[i] && i < sizeof(mode) - 1; ++i) {
+ for (i = 0; (i < sizeof(mode) - 1) && mode[i]; ++i) {
wMode[i] = (wchar_t)(mode[i] & 0xff);
}
wMode[i] = (wchar_t)0;
More information about the poppler
mailing list