]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
memvector resize needs to set _count as well
authorWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 22 Aug 2012 13:24:24 +0000 (15:24 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 22 Aug 2012 13:24:24 +0000 (15:24 +0200)
gmqcc.h

diff --git a/gmqcc.h b/gmqcc.h
index bb03a9af13b48deff346d61308416da0240a5b4b..71d3ca92563e9a3a0fe8d3ee1369d30dda6cc791 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -717,6 +717,7 @@ bool GMQCC_WARN Tself##_##mem##_resize(Tself *s, size_t c)       \
         if (!reall) { return false; }                            \
         memcpy(reall, s->mem, sizeof(Twhat) * s->mem##_count);   \
         s->mem##_alloc = c;                                      \
+        s->mem##_count = c;                                      \
         mem_d(s->mem);                                           \
         s->mem = reall;                                          \
         return true;                                             \