From: Carl Worth Date: Fri, 23 Oct 2009 21:45:33 +0000 (-0700) Subject: _find_prefix: Exit when given an invalid prefix name. X-Git-Tag: 0.1~750 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a5e619f11ffe034cfe2dc13207961ed6db5ab5ba;p=notmuch.git _find_prefix: Exit when given an invalid prefix name. This will be a nice safety check for internal sanity. --- diff --git a/message.cc b/message.cc index c5a6273f..b304a22e 100644 --- a/message.cc +++ b/message.cc @@ -99,6 +99,9 @@ _find_prefix (const char *name) if (strcmp (name, BOOLEAN_PREFIX[i].name) == 0) return BOOLEAN_PREFIX[i].prefix; + fprintf (stderr, "Internal error: No prefix exists for '%s'\n", name); + exit (1); + return ""; }