Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save apoleon/6356888 to your computer and use it in GitHub Desktop.
Save apoleon/6356888 to your computer and use it in GitHub Desktop.
From: Markus Koschany <apo@gambaru.de>
Date: Thu, 11 Jul 2013 22:50:02 +0200
Subject: fix format not a string literal error
---
src/komat/Berusky3d.cpp | 2 +-
src/komat/Ddx.cpp | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/komat/Berusky3d.cpp b/src/komat/Berusky3d.cpp
index cc78aa2..8d9c2d7 100644
--- a/src/komat/Berusky3d.cpp
+++ b/src/komat/Berusky3d.cpp
@@ -354,7 +354,7 @@ void kprintfl(char log, const char *p_text, ...)
vsprintf(text, p_text, argumenty);
va_end(argumenty);
- fprintf(stderr, text);
+ fprintf(stderr,"%s\n", text);
if (log && p_ber->debug_file) {
fputs(text, p_ber->debug_file);
diff --git a/src/komat/Ddx.cpp b/src/komat/Ddx.cpp
index 06f731f..1bbb1bb 100644
--- a/src/komat/Ddx.cpp
+++ b/src/komat/Ddx.cpp
@@ -488,7 +488,7 @@ void tiskni_chybu(int line, char *p_file, char *p_text, ...)
va_end(argumenty);
strcat(text1, text);
- fprintf(stderr, text1);
+ fprintf(stderr,"%s\n", text1);
assert(0);
exit(-1);
@@ -507,7 +507,7 @@ void tiskni_chybu_bez_exit(int line, char *p_file, char *p_text, ...)
va_end(argumenty);
strcat(text1, text);
- fprintf(stderr, text1);
+ fprintf(stderr,"%s\n", text1);
}
void mfree(void **p_mem)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment