Skip to content

Commit

Permalink
Fix bug where numbers were concatenated onto strings, use int2normal …
Browse files Browse the repository at this point in the history
…to convert an int to a string instead
  • Loading branch information
kazzmir committed Aug 23, 2006
1 parent 9e0135d commit 56a1234
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,13 @@ void menuClass::weaponMenu( RMenu * gun_menu, SpaceObject * player ) {
gun_menu->addTitle( "Buy Weapons", menuFont );
// string numnum = int2normal( player->getScore() );
string score = "Score ";
score += player->getScore();
score += int2normal( player->getScore() );
cout << "String = '" << score << "'" << endl;
gun_menu->addTitle( score, menuFont );
for ( int q = 0; q < player->getHull()->maxGuns()-1; q++ ) {
// numnum = int2str(q+1);
string bay = "Weapon Bay ";
bay += q + 1;
bay += int2normal( q + 1 );
gun_menu->addMenu( bay, menuFont,true,MENU_BUY+q,gun_menu, NO_SOUND );
}
gun_menu->addMenu( "Accessories", menuFont, true, 1, gun_menu, NO_SOUND );
Expand Down

0 comments on commit 56a1234

Please sign in to comment.