Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] (PR#6377) Unexplicit error message in cm.c
Home

[Freeciv-Dev] (PR#6377) Unexplicit error message in cm.c

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#6377) Unexplicit error message in cm.c
From: "Remi Bonnet" <remi.bonnet@xxxxxxxxxxx>
Date: Thu, 2 Oct 2003 09:16:14 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Although i don't think this part of the code maybe reached, the error
message is not really explicit.

Tiny patch attached
--- ../freeciv/common/aicore/cm.c       2003-10-02 15:11:11.000000000 +0200
+++ ./common/aicore/cm.c        2003-10-02 18:12:47.000000000 +0200
@@ -1509,8 +1509,8 @@
   case SCIENCE:
     return _("Science");
   default:
-    assert(0);
-    return "ERROR";
+    freelog(LOG_FATAL, "Unknown stat value in cm_get_stat_name: %d", stat);
+    exit(EXIT_FAILURE);
   }
 }
 

[Prev in Thread] Current Thread [Next in Thread]