Commits

Janez Demšar committed f96a8c6

Fixed an obscure bug in ExampleTable.save that probably never occurred: if specific symbols were given for DK and DC, and the class value was missing, all meta variables were saved as unknown

  • Participants
  • Parent commits bbc1074

Comments (0)

Files changed (1)

File source/orange/tabdelim.cpp

     for(mi = mb; mi != me; mi++) {
       if (!(*mi).optional) {
         PUTDELIM;
-        if (DK && ((*ri).valueType == valueDK))
+        const TValue &mval = (*ex)[(*mi).id];
+        if (DK && (mval.valueType == valueDK))
           fprintf(file, DK);
-        else if (DC && ((*ri).valueType == valueDC))
+        else if (DC && (mval.valueType == valueDC))
           fprintf(file, DC);
         else {
-          (*mi).variable->val2filestr((*ex)[(*mi).id], st, *ex);
+          (*mi).variable->val2filestr(mval, st, *ex);
           fprintf(file, "%s", checkCtrl(st.c_str()));
         }
       }