r16506 by jghali - #9878 related : fix potential infinite loop if End value is 65535

scribus-commit scribus-commit at lists.scribus.net
Fri Mar 25 22:21:19 CET 2011


Author: jghali
Date: Fri Mar 25 21:21:19 2011
New Revision: 16506

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16506
Log:
#9878 related : fix potential infinite loop if End value is 65535

Modified:
    branches/Version135/Scribus/scribus/fonts/scface_ttf.cpp

Modified: branches/Version135/Scribus/scribus/fonts/scface_ttf.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16506&path=/branches/Version135/Scribus/scribus/fonts/scface_ttf.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/fonts/scface_ttf.cpp (original)
+++ branches/Version135/Scribus/scribus/fonts/scface_ttf.cpp Fri Mar 25 21:21:19 2011
@@ -341,9 +341,9 @@
 			quint16 End ( toUint16 ( ClassRangeRecord + ( CRR * 6 ) + 2 ) );
 			quint16 Class ( toUint16 ( ClassRangeRecord + ( CRR * 6 ) + 4 ) );
 
-			for ( quint16 gl ( Start ); gl <= End; ++gl )
-			{
-				ret[0].removeAll ( gl );
+			for ( int gl ( Start ); gl <= (int) End; ++gl )
+			{
+				ret[0].removeAll ( (quint16) gl );
 				ret[Class] << gl;
 			}
 		}




More information about the scribus-commit mailing list