fixed a string bug which threw out an exeception in finale of ep1 and 2

git-svn-id: https://clonekeenplus.svn.sourceforge.net/svnroot/clonekeenplus/cgenius/trunk@211 4df4b0f3-56ce-47cb-b001-ed939b7d65a6
This commit is contained in:
gerstrong
2009-08-05 14:27:51 +00:00
parent eb7679a8ed
commit 8a28bac6a6
2 changed files with 3 additions and 1 deletions

View File

@@ -336,7 +336,8 @@ int dlgX, dlgY, dlgW, dlgH;
// draw the current text line up to the amount currently shown
tempbuf = text[textline];
tempbuf.erase(amountshown);
if(amountshown < tempbuf.size())
tempbuf.erase(amountshown);
g_pGraphics->sb_font_draw( tempbuf, (dlgX+1)*8, (dlgY+1)*8);
if (state==STATE_TEXTAPPEARING)

View File

@@ -383,6 +383,7 @@ int cancel, lastcancelstate;
// draw the text up to the amount currently shown
tempbuf = text;
if(amountshown < tempbuf.size())
tempbuf.erase(amountshown);
sb_dialogbox(boxleft,boxtop,boxwidth,boxheight);
g_pGraphics->sb_font_draw( tempbuf, (boxleft+1)*8, (boxtop+1+textline)*8);