Restored beta police system(disabled), fixes from miami, debug info for CFO crash (#639)

This commit is contained in:
erorcun
2020-07-01 15:28:43 +03:00
committed by GitHub
parent 779d4e02a4
commit eda50bc32b
14 changed files with 430 additions and 158 deletions

View File

@ -68,9 +68,11 @@ int8 RegisterNewOption(int screen)
{
numCustomFrontendOptions++;
if (numCustomFrontendOptions == 1)
customFrontendOptions = (FrontendOption*)malloc(numCustomFrontendOptions * sizeof(FrontendOption));
else
customFrontendOptions = (FrontendOption*)realloc(customFrontendOptions, numCustomFrontendOptions * sizeof(FrontendOption));
customFrontendOptions = (FrontendOption*)malloc(5 * sizeof(FrontendOption));
else if (numCustomFrontendOptions % 5 == 1)
customFrontendOptions = (FrontendOption*)realloc(customFrontendOptions, (numCustomFrontendOptions + 4) * sizeof(FrontendOption));
assert(customFrontendOptions != nil && "Custom frontend options can't be allocated");
uint8 nth = GetNumberOfMenuOptions(screen);
if (optionCursor < 0) {