linhbuingoc / ccl

Automatically exported from code.google.com/p/ccl
0 stars 0 forks source link

iVector.Erase memmove pointer error. #9

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. a = iVector.Create(sizeof(int),10);
2. iVector.Add(a,&i);
3. iVector.Add(a,&i);
4. iVector.Erase(a,1)
5. iVector.Finalize(a) will report error when Mem Debug enabled

Please change line 652 in vector.c to 

memmove(p,p+AL->ElementSize,(AL->count-idx-1)*AL->ElementSize);

Original issue reported on code.google.com by zha...@gmail.com on 24 Apr 2013 at 7:46

GoogleCodeExporter commented 8 years ago
Has this patch been applied to mainline yet?

Original comment by dles...@gmail.com on 29 Jul 2013 at 6:12

GoogleCodeExporter commented 8 years ago
Yes

Original comment by zha...@gmail.com on 27 Feb 2014 at 8:54

GoogleCodeExporter commented 8 years ago
This issue can be closed! thanks.

Original comment by zha...@gmail.com on 18 Apr 2014 at 3:21