# HG changeset patch # User Nathan Walp # Date 1073801422 0 # Node ID ceb88c0a1abb2a27b33253dc94b8a13501ea57c2 # Parent 4dede940939c3a44f5ec20e298188fd76a3d0ad8 [gaim-migrate @ 8770] the 0-byte-string trick doesn't work on non-gcc compilers. committer: Tailor Script diff -r 4dede940939c -r ceb88c0a1abb src/stringref.c --- a/src/stringref.c Sun Jan 11 03:23:55 2004 +0000 +++ b/src/stringref.c Sun Jan 11 06:10:22 2004 +0000 @@ -46,7 +46,7 @@ if (value == NULL) return NULL; - newref = g_malloc(sizeof(GaimStringref) + strlen(value) + 1); + newref = g_malloc(sizeof(GaimStringref) + strlen(value)); strcpy(newref->value, value); newref->ref = 1; @@ -60,7 +60,7 @@ if (value == NULL) return NULL; - newref = g_malloc(sizeof(GaimStringref) + strlen(value) + 1); + newref = g_malloc(sizeof(GaimStringref) + strlen(value)); strcpy(newref->value, value); newref->ref = 0x80000000; diff -r 4dede940939c -r ceb88c0a1abb src/stringref.h --- a/src/stringref.h Sun Jan 11 03:23:55 2004 +0000 +++ b/src/stringref.h Sun Jan 11 06:10:22 2004 +0000 @@ -42,7 +42,7 @@ * for GC at the next idle handler... * But you aren't going to touch this * anyway, right? */ - char value[0]; /**< The string contained in this ref. + char value[1]; /**< The string contained in this ref. * Notice that it is simply "hanging * off the end" of the ref ... this * is to save an allocation. */