projects
/
IvanGame.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
800accb
)
Fix a segfault caused by getFont().
author
Matt Mullins
<mokomull@gmail.com>
Sat, 16 Jun 2012 04:52:50 +0000
(21:52 -0700)
committer
Matt Mullins
<mokomull@gmail.com>
Sat, 16 Jun 2012 05:07:39 +0000
(22:07 -0700)
The if(font has been found) statement was written the wrong-way-'round.
Game.cpp
patch
|
blob
|
history
diff --git
a/Game.cpp
b/Game.cpp
index
4b7cec4
..
b81d9c2
100644
(file)
--- a/
Game.cpp
+++ b/
Game.cpp
@@
-241,7
+241,7
@@
Font* Game::getFont( int s = 24, FontType t = English){
map<int, Font*> font = t == English ? mEnglishFonts : mJapaneseFonts;
map<int, Font*>::iterator it = font.find(s);
//if the font doesn't exist
- if (it
!
= font.end()) {
+ if (it
=
= font.end()) {
//create it
Font* f = new Font(t, s);
font[s] = f;