[mkgmap-dev] Commit r4838: prevent infinite loop when encoder detects malformed input