summary refs log tree commit diff
path: root/src/GameDraw.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GameDraw.cpp')
-rw-r--r--src/GameDraw.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/GameDraw.cpp b/src/GameDraw.cpp
index 12ac309..911e9ea 100644
--- a/src/GameDraw.cpp
+++ b/src/GameDraw.cpp
@@ -19,7 +19,7 @@
 // You should have received a copy of the GNU General Public License
 // along with Black Shades.  If not, see <https://www.gnu.org/licenses/>.
 
-#include <stdio.h>
+#include <string>
 
 #include <GL/glu.h>
 
@@ -927,7 +927,7 @@ void Game::DrawGLScene(void)
 		static char str[256] = "";
 
 		if (!debug) {
-			char *s;
+			std::string s;
 			switch (person[0].whichgun) {
 			case nogun:
 				s = "UNARMED";
@@ -954,7 +954,7 @@ void Game::DrawGLScene(void)
 				s = "HANDGUN";
 				break;
 			}
-			glPrint(&this->text, 10, 90, s, 1, 0.8, 640, 480);
+			glPrint(&this->text, 10, 90, s.c_str(), 1, 0.8, 640, 480);
 			if(person[0].whichgun!=nogun&&person[0].whichgun!=knife&&person[0].whichgun!=grenade){
 				glColor4f(0,1,0,1);
 				glPrint(&this->text, 10, 30, "Magazines",
@@ -991,7 +991,7 @@ void Game::DrawGLScene(void)
 		} else {
 			sprintf(str, "FPS: %.0f", 1.0f / multiplier);
 			glPrint(&this->text, 10,30,str,0,.8,screenwidth,screenheight);
-			char *s;
+			std::string s;
 			switch (enemystate) {
 			case 0:
 				s = "Enemies are in random assassination mode.";
@@ -1003,7 +1003,7 @@ void Game::DrawGLScene(void)
 				s = "Enemies are in DIE!!!! mode.";
 				break;
 			}
-			glPrint(&this->text, 10, 20, s, 0, 0.8,
+			glPrint(&this->text, 10, 20, s.c_str(), 0, 0.8,
 				screenwidth, screenheight);
 			sprintf(str, "You have pointlessly shot or beaten %d unarmed civilians.", civkills);
 			glPrint(&this->text, 10,60,str,0,.8,screenwidth,screenheight);