Fix arg check for Exception.__init__
This commit is contained in:
parent
a961def84a
commit
670eced948
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user