src/error.c

changeset 15
362b7659dc76
parent 7
9dd76cbd6c90
child 16
c5dde81b6fb2
equal deleted inserted replaced
14:9dbfc0031887 15:362b7659dc76
41 41
42 void asc_error_cxstr(cxstring text) { 42 void asc_error_cxstr(cxstring text) {
43 if (text.length == 0) return; 43 if (text.length == 0) return;
44 44
45 // write error to debug output 45 // write error to debug output
46 asc_dprintf("ERROR: %*.s", (int)text.length, text.ptr); 46 asc_dprintf("ERROR: %.*s", (int)text.length, text.ptr);
47 47
48 // write error to buffer 48 // write error to buffer
49 CxBuffer* buf = &asc_context.error_buffer; 49 CxBuffer* buf = &asc_context.error_buffer;
50 cxBufferWrite(text.ptr, 1, text.length, buf); 50 cxBufferWrite(text.ptr, 1, text.length, buf);
51 cxBufferPut(buf, '\n'); 51 cxBufferPut(buf, '\n');

mercurial