summaryrefslogtreecommitdiff
path: root/src/debug.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2010-11-29 17:55:07 +0200
committerPerttu Ahola <celeron55@gmail.com>2010-11-29 17:55:07 +0200
commitd10627a77fe022263e2319be282fbec68e713545 (patch)
tree72b0c0d140aed99f17438c978fa3bf4238dc436b /src/debug.cpp
parentd2090a32d84106815b3422bbbab5e6c9c681c152 (diff)
downloadminetest-d10627a77fe022263e2319be282fbec68e713545.tar.gz
minetest-d10627a77fe022263e2319be282fbec68e713545.tar.bz2
minetest-d10627a77fe022263e2319be282fbec68e713545.zip
Windows bug fixes
Diffstat (limited to 'src/debug.cpp')
-rw-r--r--src/debug.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/debug.cpp b/src/debug.cpp
index 248941386..a2b28cd72 100644
--- a/src/debug.cpp
+++ b/src/debug.cpp
@@ -84,7 +84,7 @@ DebugStack::DebugStack(threadid_t id)
void DebugStack::print(FILE *file, bool everything)
{
- fprintf(file, "BEGIN STACK: Debug stack for thread %x:\n",
+ fprintf(file, "DEBUG STACK FOR THREAD %x:\n",
(unsigned int)threadid);
for(int i=0; i<stack_max_i; i++)
@@ -92,11 +92,10 @@ void DebugStack::print(FILE *file, bool everything)
if(i == stack_i && everything == false)
continue;
- if(everything == true && i == stack_i)
- fprintf(file, "END OF STACK.\n"
- "! Continuing beyond stack end:\n");
-
- fprintf(file, "#%d %s\n", i, stack[i]);
+ if(i < stack_i)
+ fprintf(file, "#%d %s\n", i, stack[i]);
+ else
+ fprintf(file, "(Leftover data: #%d %s)\n", i, stack[i]);
}
if(stack_i == DEBUG_STACK_SIZE)