fixed amb1483 - GetEntPropString() rejected FIELD_MODELNAME/FIELD_SOUNDNAME
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401906
This commit is contained in:
parent
5b2d36e386
commit
b144620eeb
@ -796,6 +796,8 @@ static cell_t FindDataMapOffs(IPluginContext *pContext, const cell_t *params)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case FIELD_MODELNAME:
|
||||||
|
case FIELD_SOUNDNAME:
|
||||||
case FIELD_STRING:
|
case FIELD_STRING:
|
||||||
{
|
{
|
||||||
*pSize = sizeof(string_t);
|
*pSize = sizeof(string_t);
|
||||||
@ -1614,7 +1616,9 @@ static cell_t GetEntPropString(IPluginContext *pContext, const cell_t *params)
|
|||||||
FIND_PROP_DATA(td);
|
FIND_PROP_DATA(td);
|
||||||
|
|
||||||
if (td->fieldType != FIELD_CHARACTER
|
if (td->fieldType != FIELD_CHARACTER
|
||||||
&& td->fieldType != FIELD_STRING)
|
&& td->fieldType != FIELD_STRING
|
||||||
|
&& td->fieldType != FIELD_MODELNAME
|
||||||
|
&& td->fieldType != FIELD_SOUNDNAME)
|
||||||
{
|
{
|
||||||
return pContext->ThrowNativeError("Data field %s is not a string (%d != %d)",
|
return pContext->ThrowNativeError("Data field %s is not a string (%d != %d)",
|
||||||
prop,
|
prop,
|
||||||
@ -1622,7 +1626,7 @@ static cell_t GetEntPropString(IPluginContext *pContext, const cell_t *params)
|
|||||||
FIELD_CHARACTER);
|
FIELD_CHARACTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
bIsStringIndex = (td->fieldType == FIELD_STRING);
|
bIsStringIndex = (td->fieldType != FIELD_CHARACTER);
|
||||||
|
|
||||||
offset = td->fieldOffset[TD_OFFSET_NORMAL];
|
offset = td->fieldOffset[TD_OFFSET_NORMAL];
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user