"B29049" "WOW-18125patch6.0.1" "WOW-45779patch10.0.2_Beta" "30013_Win32_2_2_0_Ptr_ptr" "prometheus-0_8_0_0-24919"
| 506 | // "30013_Win32_2_2_0_Ptr_ptr" |
| 507 | // "prometheus-0_8_0_0-24919" |
| 508 | static DWORD LoadBuildNumber(TCascStorage * hs, const char * /* szVariableName */, const char * szDataBegin, const char * szDataEnd, void * /* pvParam */) |
| 509 | { |
| 510 | DWORD dwBuildNumber = 0; |
| 511 | DWORD dwMaxValue = 0; |
| 512 | |
| 513 | // Parse the string and take the largest decimal numeric value |
| 514 | // "build-name = 1.21.5.4037-retail" |
| 515 | while(szDataBegin < szDataEnd) |
| 516 | { |
| 517 | // If the character is a digit, we include it into the built number |
| 518 | if(IsCharDigit(szDataBegin[0])) |
| 519 | { |
| 520 | dwBuildNumber = (dwBuildNumber * 10) + (szDataBegin[0] - '0'); |
| 521 | dwMaxValue = CASCLIB_MAX(dwBuildNumber, dwMaxValue); |
| 522 | } |
| 523 | else |
| 524 | { |
| 525 | // Reset build number when we find non-digit char |
| 526 | dwBuildNumber = 0; |
| 527 | } |
| 528 | |
| 529 | // Move to the next |
| 530 | szDataBegin++; |
| 531 | } |
| 532 | |
| 533 | // If we don't have a build number yet, take the max value, if any |
| 534 | if(hs->dwBuildNumber == 0 && dwMaxValue >= 100) |
| 535 | { |
| 536 | hs->dwBuildNumber = dwMaxValue; |
| 537 | return ERROR_SUCCESS; |
| 538 | } |
| 539 | return ERROR_BAD_FORMAT; |
| 540 | } |
| 541 | |
| 542 | static int LoadQueryKey(const CASC_CSV_COLUMN & Column, CASC_BLOB & Key) |
| 543 | { |
no test coverage detected