}
BufStr_Expand(stringbuffer, strindex);
+ stringbuffer->num_strings = max(stringbuffer->num_strings, strindex + 1);
if(stringbuffer->strings[strindex])
Mem_Free(stringbuffer->strings[strindex]);
}
order = (int)PRVM_G_FLOAT(OFS_PARM2);
if(order)
- strindex = stringbuffer->num_strings++;
+ strindex = stringbuffer->num_strings;
else
for (strindex = 0;strindex < stringbuffer->num_strings;strindex++)
if (stringbuffer->strings[strindex] == NULL)
}
}
+// #487 float(float caseinsensitive, string s, ...) hash
+void VM_hash(void)
+{
+ float insensitive;
+ static char s[VM_STRINGTEMP_LENGTH];
+ VM_SAFEPARMCOUNTRANGE(2, 8, VM_hash);
+ insensitive = PRVM_G_FLOAT(OFS_PARM0);
+ VM_VarString(1, s, sizeof(s));
+ PRVM_G_FLOAT(OFS_RETURN) = (unsigned short) ((insensitive ? CRC_Block_CaseInsensitive : CRC_Block) ((unsigned char *) s, strlen(s)));
+}
+
void VM_wasfreed (void)
{
VM_SAFEPARMCOUNT(1, VM_wasfreed);
VM_strreplace, // #484 string(string search, string replace, string subject) strreplace (DP_QC_STRREPLACE)
VM_strireplace, // #485 string(string search, string replace, string subject) strireplace (DP_QC_STRREPLACE)
VM_SV_getsurfacepointattribute,// #486 vector(entity e, float s, float n, float a) getsurfacepointattribute = #486;
-NULL, // #487
+VM_hash, // #487 float(float caseinsensitive, string s, ...) hash = #487;
NULL, // #488
NULL, // #489
NULL, // #490