commit 699c0c5c34a58a1ce3d6150fca6c7f4721891b81
parent 435746c763707f611101eb9ef330358ff6f5a92e
Author: Claudio Alessi <smoppy@gmail.com>
Date: Tue, 25 Jul 2017 19:09:17 +0200
Undo previous commit.
It's needed to get rid of bufpos() and find a proper way to handle line/offset.
At worst I'll simply remove it at the cost of a little less DRY.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/circo.c b/circo.c
@@ -211,7 +211,7 @@ bufpos(char *buf, int len, int *line, int *off) {
int set = 0, x, y, i;
for(i = 0, x = y = 1; i < len; ++i) {
- if(!set && line && off != -1) {
+ if(!set && line && off) {
if(*off == i) {
if(*line < 1)
*line = y;