Ignore floats in str.__mod__ in KKR_NO_FLOAT

This commit is contained in:
K. Lange 2023-05-30 09:10:38 +09:00
parent bff66e2b72
commit f3b8858727

View File

@ -590,8 +590,10 @@ KRK_Method(str,__mod__) {
if (IS_INTEGER(arg)) {
krk_push(INTEGER_VAL(AS_INTEGER(arg)));
#ifndef KRK_NO_FLOAT
} else if (IS_FLOATING(arg)) {
krk_push(INTEGER_VAL(AS_FLOATING(arg)));
#endif
} else {
krk_runtimeError(vm.exceptions->typeError, "%%i format: a number is required, not '%T'", arg);
goto _exception;