| 3383 | } |
| 3384 | |
| 3385 | Proto* findSubFunction(GluaDecompileContextP ctx, Proto* f, std::string funcnumstr, std::string &realfuncnumstr) { |
| 3386 | Proto* cf = f; |
| 3387 | auto startstr = funcnumstr; |
| 3388 | const char* endstr; |
| 3389 | |
| 3390 | int c = stoi(startstr); |
| 3391 | if (c != 0) { |
| 3392 | return nullptr; |
| 3393 | } |
| 3394 | endstr = strchr(startstr.c_str(), '_'); |
| 3395 | startstr = endstr + 1; |
| 3396 | realfuncnumstr = "0"; |
| 3397 | ctx->functionnum = 0; |
| 3398 | |
| 3399 | while (!(endstr == nullptr)) { |
| 3400 | c = stoi(startstr); |
| 3401 | if (c < 0 || c >= cf->sizep) { |
| 3402 | return nullptr; |
| 3403 | } |
| 3404 | cf = cf->p[c]; |
| 3405 | endstr = strchr(startstr.c_str(), '_'); |
| 3406 | startstr = endstr + 1; |
| 3407 | realfuncnumstr = realfuncnumstr + "_" + std::to_string(c); |
| 3408 | ctx->functionnum = c + 1; |
| 3409 | } |
| 3410 | return cf; |
| 3411 | } |
| 3412 | |
| 3413 | std::string ProcessSubFunction(GluaDecompileContextP ctx, Proto* cf, int func_checking, std::string funcnumstr) { |
| 3414 | int i; |
no test coverage detected