فهرست منبع

tweak textedit sample fix

Sean Barrett 11 سال پیش
والد
کامیت
2684499fce
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      tests/textedit_sample.c

+ 1 - 1
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
 }