@@ -642,24 +642,26 @@ fromBuffer: [str cString]]; } - (size_t)writeLine: (OFString*)str { - size_t len = [str cStringLength]; + size_t ret, len = [str cStringLength]; char *buf; buf = [self allocMemoryWithSize: len + 1]; @try { memcpy(buf, [str cString], len); buf[len] = '\n'; - return [self writeNBytes: len + 1 - fromBuffer: buf]; + ret = [self writeNBytes: len + 1 + fromBuffer: buf]; } @finally { [self freeMemory: buf]; } + + return ret; } - (size_t)writeFormat: (OFString*)fmt, ... { va_list args;