diff --git a/ke/Makefile b/ke/Makefile index fe0b519..41f39d6 100644 --- a/ke/Makefile +++ b/ke/Makefile @@ -2,7 +2,7 @@ BIN := ke OBJS := main.o LDFLAGS := -CFLAGS := -pedantic -Wall -Werror -Wextra -O2 -std=c99 -g +CFLAGS := -pedantic -Wall -Werror -Wextra -O0 -std=c99 -g .PHONY: all all: build diff --git a/ke/main.c b/ke/main.c index eb11d03..44f759f 100644 --- a/ke/main.c +++ b/ke/main.c @@ -194,7 +194,7 @@ insert_row(int at, char *s, size_t len) if (at < editor.nrows) { memmove(&editor.row[at+1], &editor.row[at], - sizeof(erow) * (editor.rows - at)); + sizeof(erow) * (editor.rows - at + 1)); } editor.row[at].size = len;