[quake3-commits] r1867 - trunk/code/qcommon
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Feb 6 22:56:15 EST 2011
Author: thilo
Date: 2011-02-06 22:56:15 -0500 (Sun, 06 Feb 2011)
New Revision: 1867
Modified:
trunk/code/qcommon/vm_x86_64_assembler.c
Log:
strdup still not accepted by some systems. *sigh*.
Modified: trunk/code/qcommon/vm_x86_64_assembler.c
===================================================================
--- trunk/code/qcommon/vm_x86_64_assembler.c 2011-02-06 20:35:46 UTC (rev 1866)
+++ trunk/code/qcommon/vm_x86_64_assembler.c 2011-02-07 03:56:15 UTC (rev 1867)
@@ -241,12 +241,15 @@
{
struct hashentry* h;
unsigned i = hashkey(label, -1U);
+ int labellen;
i %= sizeof(labelhash)/sizeof(labelhash[0]);
h = malloc(sizeof(struct hashentry));
- h->label = strdup(label);
-
+ labellen = strlen(label) + 1;
+ h->label = malloc(labellen);
+ memcpy(h->label, label, labellen);
+
h->address = address;
h->next = labelhash[i];
labelhash[i] = h;
More information about the quake3-commits
mailing list