Fix arg check for Exception.__init__

This commit is contained in:
K. Lange 2021-02-14 11:30:27 +09:00
parent a961def84a
commit 670eced948

View File

@ -16,7 +16,7 @@
static KrkValue krk_initException(int argc, KrkValue argv[], int hasKw) {
KrkInstance * self = AS_INSTANCE(argv[0]);
if (argc > 0) {
if (argc > 1) {
krk_attachNamedValue(&self->fields, "arg", argv[1]);
} else {
krk_attachNamedValue(&self->fields, "arg", NONE_VAL());