]> git.pond.sub.org Git - empserver/blobdiff - src/lib/common/type.c
Fix trailing whitespace
[empserver] / src / lib / common / type.c
index 7f31d8991039b9116d61fac75c5df7d427de0b71..2f5a32beaf9ea57a2a28804f7cf25f4ff23e1239 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2007, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -26,7 +26,7 @@
  *  ---
  *
  *  type.c: typename to array offset translation
- * 
+ *
  *  Known contributors to this file:
  *     Dave Pare, 1989
  *     Steve McClure, 2000
@@ -63,6 +63,7 @@ sct_typematch(char *name)
 
 /*
  * Search table TYPE for an element matching NAME, return its index.
+ * Accepts EF_BAD, but of course never finds anything then.
  * Return M_NOTFOUND if there are no matches, M_NOTUNIQUE if there are
  * several.
  */
@@ -70,6 +71,8 @@ int
 ef_elt_byname(int type, char *name)
 {
     switch (type) {
+    case EF_BAD:
+       return M_NOTFOUND;
     case EF_NATION:
        return cnumb(name);
     case EF_SECTOR_CHR: