Add a missing g_return_if_fail().

Sat Sep  9 18:50:42 2000  Owen Taylor  <otaylor@redhat.com>

	* gstrfuncs.c (g_strescape): Add a missing g_return_if_fail().
This commit is contained in:
Owen Taylor
2000-09-10 16:04:33 +00:00
committed by Owen Taylor
parent 25c1ae6c11
commit 333f4c4325
10 changed files with 50 additions and 8 deletions

View File

@@ -1152,11 +1152,16 @@ gchar *
g_strescape (const gchar *source,
const gchar *exceptions)
{
const guchar *p = (guchar *) source;
/* Each source byte needs maximally four destination chars (\777) */
gchar *dest = g_malloc (strlen (source) * 4 + 1);
gchar *q = dest;
const guchar *p;
gchar *dest;
gchar *q;
guchar excmap[256];
g_return_val_if_fail (source != NULL, NULL);
p = (guchar *) source;
/* Each source byte needs maximally four destination chars (\777) */
q = dest = g_malloc (strlen (source) * 4 + 1);
memset (excmap, 0, 256);
if (exceptions)