From e74cbddb0463e93f5d9742accc20bbed027d0b9b Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 31 May 2022 23:02:18 -0700 Subject: Chapter 25.2 --- clox/src/object.c | 1 + 1 file changed, 1 insertion(+) (limited to 'clox/src/object.c') diff --git a/clox/src/object.c b/clox/src/object.c index c12fb82..8d26d8b 100644 --- a/clox/src/object.c +++ b/clox/src/object.c @@ -28,6 +28,7 @@ ObjClosure *newClosure(ObjFunction *function) { ObjFunction *newFunction() { ObjFunction *function = ALLOCATE_OBJ(ObjFunction, OBJ_FUNCTION); function->arity = 0; + function->upvalueCount = 0; function->name = NULL; initChunk(&function->chunk); return function; -- cgit v1.2.3-54-g00ecf