diff --git a/tools/qfcc/source/class.c b/tools/qfcc/source/class.c index caa1967cd..841fa53a0 100644 --- a/tools/qfcc/source/class.c +++ b/tools/qfcc/source/class.c @@ -925,7 +925,7 @@ class_find_method (class_type_t *class_type, method_t *method) start_methods = methods; start_class = class; while (class) { - for (m = methods->head; m; m = m->next) + for (m = methods->head; m; m = m->next) { if (method_compare (method, m)) { if (m->type != method->type) error (0, "method type mismatch"); @@ -937,6 +937,7 @@ class_find_method (class_type_t *class_type, method_t *method) method_set_param_names (m, method); return m; } + } if (class->methods == methods) class = class->super_class; else diff --git a/tools/qfcc/source/method.c b/tools/qfcc/source/method.c index 883133b64..726acfd76 100644 --- a/tools/qfcc/source/method.c +++ b/tools/qfcc/source/method.c @@ -474,7 +474,7 @@ emit_methods (methodlist_t *methods, const char *name, int instance) if (!methods) return 0; - for (count = 0, m = methods->head; m; m = m->next) + for (count = 0, m = methods->head; m; m = m->next) { if (!m->instance == !instance) { if (!m->def && options.warnings.unimplemented) { warning (0, "Method `%c%s' not implemented", @@ -483,6 +483,7 @@ emit_methods (methodlist_t *methods, const char *name, int instance) if (m->def) count++; } + } if (!count) return 0; methods->count = count;