comparison core/WriteFile.cpp @ 158:45fc760622c9

Fixed WriteFile, now it does not hang if echo is off and format is binary
author Giulio Moro <giuliomoro@yahoo.it>
date Wed, 14 Oct 2015 17:55:58 +0100
parents f36313cbb55d
children 1e7db6610600
comparison
equal deleted inserted replaced
157:f36313cbb55d 158:45fc760622c9
201 return getOffsetFromPointer(textReadPointer); 201 return getOffsetFromPointer(textReadPointer);
202 } 202 }
203 } 203 }
204 204
205 void WriteFile::writeOutput(bool writeAll){ 205 void WriteFile::writeOutput(bool writeAll){
206 while( getOffsetFromPointer(textReadPointer) >= lineLength){ //if there is less than one line worth of data to write, skip over. 206 while((echo == true || fileType == kText) && getOffsetFromPointer(textReadPointer) >= lineLength){ //if there is less than one line worth of data to write, skip over.
207 // So we make sure we only write full lines 207 // So we make sure we only write full lines
208 writeLine(); 208 writeLine();
209 } 209 }
210 if(fileType == kBinary){ 210 if(fileType == kBinary){
211 int numBinaryElementsToWriteAtOnce = 100; 211 int numBinaryElementsToWriteAtOnce = 100;