The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

RE: Re: RioNet file formats?


  • Subject: RE: Re: RioNet file formats?
  • From: John B
  • Date: Wed, 31 Mar 2004 12:27:00 +0000

> Assuming this means there is no header, then I can see what's
happening.
>
> The stream code strips the header so when it's trying to redim the
byte
> array to read/skip the header it's doing redim b(hs-1)
>
> If hs=0 then hs-1=-1=redim b(-1) and the code crashes.... DOH!
>
> Will debug thru this evening to check this _is_ what's happening and
release
> a fix.

The act of redimming to -1 shouldn't be a problem.
In fact, that's how you make an empty array.

Redim myArray(0)

actually creates an array with 1 element, as everything in .NET is
zero-based.

So redim myArray(-1) will create an empty array.

At least I'm pretty sure that's how things work - can't check right now.

Regards,

John






xPL Main Index | xPL Thread Index | xPL Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.