Added some missing code for LSS.
[gedcom-parse.git] / gom / user_rec.c
index a685f3def47c8f4bdaa7d2da41d918429e16dac8..4dfd14fba66e59ee85654c39f9d622e7a7b8529a 100644 (file)
@@ -317,13 +317,14 @@ int write_user_data(Gedcom_write_hndl hndl, struct user_data* data)
 
   if (!data) return 1;
 
-  for (obj = data; data; data = data->next) {
+  for (obj = data; obj; obj = obj->next) {
     if (obj->xref_value)
       result |= gedcom_write_user_xref(hndl, obj->level, obj->tag, NULL,
                                       obj->xref_value);
-    else
+    else {
       result |= gedcom_write_user_str(hndl, obj->level, obj->tag, NULL,
                                      obj->str_value);
+    }
   }
   return result;
 }