Index: libgwyddion/gwyutils.c
===================================================================
RCS file: /cvsroot/gwyddion/gwyddion/libgwyddion/gwyutils.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -p -r1.29 -r1.30
--- libgwyddion/gwyutils.c      21 Oct 2004 10:25:02 -0000      1.29
+++ libgwyddion/gwyutils.c      30 Oct 2004 21:10:49 -0000      1.30
@@ -1,5 +1,5 @@
 /*
- *  @(#) $Id: gwyutils.c,v 1.29 2004/10/21 10:25:02 yeti Exp $
+ *  @(#) $Id: gwyutils.c,v 1.30 2004/10/30 21:10:49 yeti-dn Exp $
  *  Copyright (C) 2003-2004 David Necas (Yeti), Petr Klapetek.
  *  E-mail: yeti@gwyddion.net, klapetek@gwyddion.net.
  *
@@ -444,7 +444,7 @@ gwy_debug_gnu(const gchar *domain,
 
 /**
  * gwy_sgettext:
- * @msgid: Message id to translate.  It MUST contain at least one `|'.
+ * @msgid: Message id to translate, containing `|'-separated prefix.
  *
  * Translate a message id containing disambiguating prefix ending with `|'.
  *
@@ -456,10 +456,15 @@ gwy_debug_gnu(const gchar *domain,
 gchar*
 gwy_sgettext(const gchar *msgid)
 {
-    char *msgstr;
+    char *msgstr, *p;
 
     msgstr = gettext(msgid);
-    return (msgstr == msgid) ? strrchr(msgstr, '|') + 1 : msgstr;
+    if (msgstr == msgid) {
+        p = strrchr(msgstr, '|');
+        return p ? p+1 : msgstr;
+    }
+
+    return msgstr;
 }
 
 /**

