- if (++profile > 10000000) // LordHavoc: increased runaway loop limit 100x
- {
- // LordHavoc: update profile counter for debugging reasons
- // (identifying erroneous loops and recursion patterns)
- prog->xfunction->profile += profile - startprofile;
- startprofile = profile;
- // update the statement number before we error out
- prog->xstatement = st - prog->statements;
- PRVM_ERROR("runaway loop counter hit limit of %d opcodes\ntip: if having trouble identifying the problem, try typing profile now in %s", profile, PRVM_NAME);
- }