* Decodes the given encoded index. * * Stack: 1 - An encoded index. * * @param script The script engine to operate on. * @return The decoded index, or 0xFFFF if invalid. */
| 245 | * @return The decoded index, or 0xFFFF if invalid. |
| 246 | */ |
| 247 | uint16 Script_General_DecodeIndex(ScriptEngine *script) |
| 248 | { |
| 249 | uint16 index; |
| 250 | |
| 251 | index = STACK_PEEK(1); |
| 252 | |
| 253 | if (!Tools_Index_IsValid(index)) return 0xFFFF; |
| 254 | |
| 255 | return Tools_Index_Decode(index); |
| 256 | } |
| 257 | |
| 258 | /** |
| 259 | * Gets the type of the given encoded index. |
nothing calls this directly
no test coverage detected