[Kst] kdeextragear-2/kst/kst/datasources/ascii

George Staikos staikos at kde.org
Mon Jan 24 03:39:47 CET 2005


CVS commit by staikos: 

crash fix - don't start to read when there's nothing to read, because it causes
a call to new char[x] for x < 1


  M +4 -2      ascii.cpp   1.34


--- kdeextragear-2/kst/kst/datasources/ascii/ascii.cpp  #1.33:1.34
@@ -174,4 +174,8 @@ int AsciiSource::readField(double *v, co
   int bufread = _rowIndex[s + n] - bufstart;
 
+  if (bufread <= 0) {
+    return 0;
+  }
+
   QFile file(_filename);
   if (!file.open(IO_ReadOnly)) {




More information about the Kst mailing list