Преглед изворни кода

[da.h] Fixing a stack-overflow error

Vinicius Teshima пре 1 година
родитељ
комит
7381e914ed
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/da.h

+ 1 - 1
src/da.h

@@ -68,7 +68,7 @@
 			DA_INC_CAP(da)					\
 		}							\
 		memmove((da).items+index+1, (da).items+index,		\
-			(da).cap - index);				\
+			(da).cap - index-1);				\
 		(da).items[index] = item;				\
 		(da).size++;						\
 	} while(0)