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'); |