From f3b88587274f74e29360d8201f9f10c88f5c54a4 Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Tue, 30 May 2023 09:10:38 +0900 Subject: [PATCH] Ignore floats in str.__mod__ in KKR_NO_FLOAT --- src/obj_str.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/obj_str.c b/src/obj_str.c index 99b1c49..5460738 100644 --- a/src/obj_str.c +++ b/src/obj_str.c @@ -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;