smhg / gettext-parser

Parse and compile gettext po and mo files, nothing more, nothing less
MIT License
160 stars 44 forks source link

Wrong hash table offset in mocompiler #8

Closed qiaolei81 closed 9 years ago

qiaolei81 commented 9 years ago

From the specification of mo file format https://www.gnu.org/software/gettext/manual/html_node/MO-Files.html

The hash table offset should be in mocompiler.js - line 192: // hash table offset returnBuffer[this._writeFunc](28 + (4 + 4) * list.length * 2, 24);

Please let me know if I was wrong.

andris9 commented 9 years ago

You are right, the location address is not stored correctly. So far this hasn't been an issue as the hash table length is 0. I fixed the location and published it as v1.1.1