Explorar el Código

Fix off-by-one error

Wichert Akkerman hace 25 años
padre
commit
a8f785af07
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      main/showpkg.c

+ 1 - 1
main/showpkg.c

@@ -71,7 +71,7 @@ static void parsestring(struct lstitem* cur, const char* fmt, const char* fmtend
 
 	cur->type=string;
 	write=cur->data=(char*)malloc(len+1);
-	while (fmt<fmtend) {
+	while (fmt<=fmtend) {
 		if (*fmt=='\\') {
 			fmt++;
 			switch (*fmt) {