------------------------------------------------------------------------------------ Determine if the given parameter is a numeric type ------------------------------------------------------------------------------------
| 1357 | // Determine if the given parameter is a numeric type |
| 1358 | // ------------------------------------------------------------------------------------ |
| 1359 | bool IsNumericParam(string paramType) |
| 1360 | { |
| 1361 | string numericDataTypes[] = { "BYTE", "CHAR", "DWORD", "DWORDLONG", "DWORD32", "DWORD64", |
| 1362 | "FLOAT", "INT", "INT8", "INT16", "INT32", "INT64", "LONG", "LONGLONG", "LONG32", "LONG64", |
| 1363 | "QWORD", "SHORT", "UINT", "UINT8", "UINT16", "UINT32", "UINT64", "ULONG", "ULONGLONG", "ULONG32", |
| 1364 | "ULONG64", "USHORT", "WORD", "SIZE_T" }; |
| 1365 | |
| 1366 | char szParam[MAX_PATH] = ""; |
| 1367 | transform(paramType.begin(), paramType.end(), paramType.begin(), toupper); |
| 1368 | strcpy_s(szParam, paramType.c_str()); |
| 1369 | TruncateString(szParam, ' '); |
| 1370 | |
| 1371 | for (auto typ : numericDataTypes) |
| 1372 | { |
| 1373 | if (strcmp(szParam, typ.c_str()) == 0) |
| 1374 | return true; |
| 1375 | } |
| 1376 | |
| 1377 | return false; |
| 1378 | } |
| 1379 | |
| 1380 | // ------------------------------------------------------------------------------------ |
| 1381 | // Returns true if instruction is manipulating the stack pointer like MOV [ESP] |
no test coverage detected