[mkgmap-dev] [PATCH] Bug in label encoding

2010-02-07 Thread Ronny Klier
I think there is a bug in label encoding in Format6Encoder. For some string length the last encoded byte is not stored. E.g. having a string "10007" the encoded byte buffer looks like this [0] [0x86] [1] [0x8] [2] [0x20] [3] [0x9f] [4] [0xf0] The number of stored

Re: [mkgmap-dev] [PATCH] Bug in label encoding

2010-02-07 Thread Marko Mäkelä
On Mon, Feb 08, 2010 at 12:47:50AM +0100, Ronny Klier wrote: > I think there is a bug in label encoding in Format6Encoder. For some > string length the last encoded byte is not stored. > > E.g. having a string "10007" the encoded byte buffer looks like this > > [0] [0x86] > [1] [0x8] > [

Re: [mkgmap-dev] [PATCH] Bug in label encoding

2010-02-08 Thread Steve Ratcliffe
On 07/02/10 23:47, Ronny Klier wrote: > I think there is a bug in label encoding in Format6Encoder. For some > string length the last encoded byte is not stored. > > E.g. having a string "10007" the encoded byte buffer looks like this > > [0] [0x86] > [1] [0x8] > [2] [0x20] > [3] [0x9f] > [4] [0xf0

Re: [mkgmap-dev] [PATCH] Bug in label encoding

2010-02-08 Thread Toby Speight
0> In article <20100208071528.ga11...@x60s>, 0> Marko Mäkelä mailto:marko.mak...@iki.fi> ("Marko") wrote: Marko> An integer version of your formula would also work in this case: Marko> Marko> int len = (off * 6 + 7) / 8 = 43/8 = 5.375 = 5 Marko> Marko> This formula is clear to me: it will

Re: [mkgmap-dev] [PATCH] Bug in label encoding

2010-02-08 Thread Ronny Klier
Am 08.02.2010 10:46, schrieb Steve Ratcliffe: > On 07/02/10 23:47, Ronny Klier wrote: >> I think there is a bug in label encoding in Format6Encoder. For some >> string length the last encoded byte is not stored. >> >> E.g. having a string "10007" the encoded byte buffer looks like this >> >> [0] [0