comparison UI/UiGame.cpp @ 1470:c987b5ed09af

footer array fix
author zipi
date Mon, 26 Aug 2013 19:11:55 +0100
parents 2ca62c9e7b3c
children 7ef4b64f6329 47c89461be23
comparison
equal deleted inserted replaced
1469:bba0944c9b27 1470:c987b5ed09af
1385 if ( GameUI_Footer_TimeLeft ) 1385 if ( GameUI_Footer_TimeLeft )
1386 { 1386 {
1387 for ( i = pFontLucida->GetLineWidth(GameUI_Footer_TimedString.data()); 1387 for ( i = pFontLucida->GetLineWidth(GameUI_Footer_TimedString.data());
1388 i > 450; 1388 i > 450;
1389 i = pFontLucida->GetLineWidth(GameUI_Footer_TimedString.data()) ) 1389 i = pFontLucida->GetLineWidth(GameUI_Footer_TimedString.data()) )
1390 byte_5C3427[strlen(GameUI_Footer_TimedString.data())] = 0; 1390 GameUI_Footer_TimedString[strlen(GameUI_Footer_TimedString.data()) - 1] = 0;
1391 } 1391 }
1392 else 1392 else
1393 { 1393 {
1394 strcpy(pFooterString.data(), v1); 1394 strcpy(pFooterString.data(), v1);
1395 for ( j = pFontLucida->GetLineWidth(pFooterString.data()); 1395 for ( j = pFontLucida->GetLineWidth(pFooterString.data());
1396 j > 450; 1396 j > 450;
1397 j = pFontLucida->GetLineWidth(pFooterString.data()) ) 1397 j = pFontLucida->GetLineWidth(pFooterString.data()) )
1398 GameUI_Footer_TimedString[strlen(pFooterString.data()) + 199] = 0; 1398 pFooterString[strlen(pFooterString.data()) - 1] = 0;
1399 } 1399 }
1400 } 1400 }
1401 } 1401 }
1402 1402
1403 //----- (0041C179) -------------------------------------------------------- 1403 //----- (0041C179) --------------------------------------------------------
1426 v3 = 450; 1426 v3 = 450;
1427 while ( v2 > 450 ) 1427 while ( v2 > 450 )
1428 { 1428 {
1429 v4 = strlen(GameUI_Footer_TimedString.data()); 1429 v4 = strlen(GameUI_Footer_TimedString.data());
1430 v5 = pFontLucida; 1430 v5 = pFontLucida;
1431 byte_5C3427[v4] = 0; 1431 GameUI_Footer_TimedString[v4 - 1] = 0;
1432 v2 = pFontLucida->GetLineWidth(GameUI_Footer_TimedString.data()); 1432 v2 = pFontLucida->GetLineWidth(GameUI_Footer_TimedString.data());
1433 } 1433 }
1434 } 1434 }
1435 else 1435 else
1436 { 1436 {
1439 v3 = 450; 1439 v3 = 450;
1440 while ( v6 > 450 ) 1440 while ( v6 > 450 )
1441 { 1441 {
1442 v7 = strlen(pFooterString.data()); 1442 v7 = strlen(pFooterString.data());
1443 v8 = pFontLucida; 1443 v8 = pFontLucida;
1444 GameUI_Footer_TimedString[v7 + 199] = 0; 1444 pFooterString[v7 - 1] = 0;
1445 v6 = pFontLucida->GetLineWidth(pFooterString.data()); 1445 v6 = pFontLucida->GetLineWidth(pFooterString.data());
1446 } 1446 }
1447 } 1447 }
1448 v9 = *v1 == 0; 1448 v9 = *v1 == 0;
1449 bForceDrawFooter = 0; 1449 bForceDrawFooter = 0;