From 2684499fcea02900c331ecf1764795923a0703c6 Mon Sep 17 00:00:00 2001 From: Sean Barrett Date: Fri, 6 Jun 2014 23:59:38 -0700 Subject: [PATCH] tweak textedit sample fix --- tests/textedit_sample.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/textedit_sample.c b/tests/textedit_sample.c index 48b0c4f..d704867 100644 --- a/tests/textedit_sample.c +++ b/tests/textedit_sample.c @@ -32,7 +32,7 @@ void layout_func(StbTexteditRow *row, STB_TEXTEDIT_STRING *str, int start_i) int delete_chars(STB_TEXTEDIT_STRING *str, int pos, int num) { - memmove(&str->string[pos], &str->string[pos+num], str->stringlen - pos - num); + memmove(&str->string[pos], &str->string[pos+num], str->stringlen - (pos+num)); str->stringlen -= num; return 1; // always succeeds }