[PATCH] Smalltalk subclass: Foo

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Smalltalk subclass: Foo

Paolo Bonzini-2
The first issue reported on the new site. :-)

The test was there but was accessing a NULL pointer.

Paolo

--- orig/libgst/gst-parse.c
+++ mod/libgst/gst-parse.c
@@ -900,6 +900,7 @@ parse_class (tree_node list)
  {
    const char* name;
    OOP currentOOP = _gst_current_namespace;
+  tree_node next;

    if (strcmp (list->v_list.name, "nil") == 0)
        return _gst_nil_oop;
@@ -915,9 +916,8 @@ parse_class (tree_node list)
           return NULL;
         }

-      list = list->v_list.next;
-
-      if (list == NULL)
+      next = list->v_list.next;
+      if (next == NULL)
  {
   if (!_gst_object_is_kind_of (currentOOP, _gst_class_class))
     {
@@ -937,6 +937,7 @@ parse_class (tree_node list)
       return NULL;
     }
  }
+      list = next;
      }
    while (list != NULL);



_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk