Overview
Comment: | Fix a bug in OFStream that was introduced by the new \0 behaviour. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
16786b4e7e812b828776dd9b6c149992 |
User & Date: | js on 2009-11-09 23:18:34 |
Other Links: | manifest | tags |
Context
2009-11-10
| ||
15:32 | Improve -[compare:]. check-in: 6772512e3e user: js tags: trunk | |
2009-11-09
| ||
23:18 | Fix a bug in OFStream that was introduced by the new \0 behaviour. check-in: 16786b4e7e user: js tags: trunk | |
23:08 | Fix a forgotten rename. check-in: e94f3f9452 user: js tags: trunk | |
Changes
Modified src/OFStream.m from [da1c9ea74b] to [1e66caad30].
︙ | |||
66 67 68 69 70 71 72 | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | - + | - (OFString*)readLine { return [self readLineWithEncoding: OF_STRING_ENCODING_UTF_8]; } - (OFString*)readLineWithEncoding: (enum of_string_encoding)encoding { |
︙ | |||
124 125 126 127 128 129 130 131 132 | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | + - + | [self freeMemory: tmp]; @throw e; } /* Look if there's a newline or \0 */ for (i = 0; i < len; i++) { if (OF_UNLIKELY(tmp[i] == '\n' || tmp[i] == '\0')) { ret_len = cache_len + i; @try { ret_c = [self |
︙ | |||
163 164 165 166 167 168 169 | 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | - + | } [self freeMemory: tmp]; @try { ret = [OFString stringWithCString: ret_c encoding: encoding |
︙ |