stringstore_get should work on STRINGID_NONE too.

Sat, 27 Jan 2007 00:28:27 +0100

author
Tuomo Valkonen <tuomov@iki.fi>
date
Sat, 27 Jan 2007 00:28:27 +0100
changeset 106
f1bb821008fc
parent 105
de53cada1423
child 107
da2a985da6ee

stringstore_get should work on STRINGID_NONE too.

stringstore.c file | annotate | diff | comparison | revisions
--- a/stringstore.c	Thu Jan 25 20:15:55 2007 +0100
+++ b/stringstore.c	Sat Jan 27 00:28:27 2007 +0100
@@ -21,7 +21,9 @@
 
 const char *stringstore_get(StringId id)
 {
-    return (const char*)(((Rb_node)id)->k.key);
+    return (id==STRINGID_NONE
+            ? NULL
+            : (const char*)(((Rb_node)id)->k.key));
 }
 
 

mercurial