src/buffer.c

changeset 542
45bcfd152f85
parent 541
67e078518935
child 543
7b9114030ca4
equal deleted inserted replaced
541:67e078518935 542:45bcfd152f85
165 perform_flush = true; 165 perform_flush = true;
166 } else { 166 } else {
167 // truncate data to be written, if we can neither extend nor flush 167 // truncate data to be written, if we can neither extend nor flush
168 len = buffer->capacity - buffer->pos; 168 len = buffer->capacity - buffer->pos;
169 if (size > 1) { 169 if (size > 1) {
170 // TODO: this is bugged - it would only discard one element and not as many as required
171 len -= len % size; 170 len -= len % size;
172 } 171 }
173 nitems = len / size; 172 nitems = len / size;
174 } 173 }
175 } 174 }

mercurial