]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Fix two bugs
authorDale Weiler <killfieldengine@gmail.com>
Sun, 2 Jun 2013 08:49:16 +0000 (08:49 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Sun, 2 Jun 2013 08:49:16 +0000 (08:49 +0000)
stat.c

diff --git a/stat.c b/stat.c
index 7f8a498b80c2ce0d682173071d95f4935173891e..3d4d4a44b71e6c0672ac194d76d31874f8488733 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -530,6 +530,9 @@ static void stat_dump_mem_info() {
 static void stat_dump_stats_table(stat_size_table_t table, const char *string, uint64_t *size) {
     size_t i,j;
     
+    if (!table)
+        return;
+    
     for (i = 0, j = 0; i < ST_SIZE; i++) {
         stat_size_entry_t *entry;
 
@@ -554,7 +557,7 @@ void stat_info() {
 
     if (OPTS_OPTION_BOOL(OPTION_MEMCHK) ||
         OPTS_OPTION_BOOL(OPTION_STATISTICS)) {
-        uint64_t mem;
+        uint64_t mem = 0;
         
         con_out("\nAdditional Statistics:\n\
     Total vectors allocated:    %llu\n\