]> granicus.if.org Git - re2c/commitdiff
- Fix bitmap generation
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Mon, 23 Jan 2006 00:44:38 +0000 (00:44 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Mon, 23 Jan 2006 00:44:38 +0000 (00:44 +0000)
code.cc

diff --git a/code.cc b/code.cc
index 9d54677409319a98facc17b83475207ea484cc4a..84f66ee59d567af60bacaffbaa016f127cdf86f4 100644 (file)
--- a/code.cc
+++ b/code.cc
@@ -213,7 +213,7 @@ void BitMap::gen(std::ostream &o, uint ind, uint lb, uint ub)
                o << indent(ind) << "static unsigned char yybm[] = {";
                uint n = ub - lb;
                uint *bm = new uint[n];
-               memset(bm, 0, n);
+               memset(bm, 0, n*sizeof(uint));
 
                for (uint i = 0; b; i += n)
                {