Subj : Bug related to Bullseye bulletin board?
To   : All
From : Karloch
Date : Sun Oct 26 2008 12:20 pm

I'm not sure if this is the right place to post about it, as I think that
Javascript code is correct, maybe it is a bug in the Javascript interpreter.

The problem is that since upgraded to lastest build Synchronet (3.15 I think).
Bullseye doesn't seem to be working rightly. Whatevet I select a bulletin to
display it says "Invalid bulletin number". I switched the Bullseye program from
the Baja one to the Javascript version, as I understand js better and could
take a look to the code (the problem was still there, no matter the switch).

It looks like the problem is related to the File.position property, at lines 41
and 42:

mode=file.readln();
filepos=file.position;

The former reads the first line of bullseye.cfg correctly, retrieving the
number stored there, but them for some strange reason, the latter line stores
in filepos the number -4. Being file.position the offset in bytes of the file
and as the first line is just a character (4 bytes), it doesn't make much sense
to be "-4", it should be "4". From that point the program won't work correctly
as it will never enter in the loop:

file.position=filepos; // file.position=-4
i=0;
while((str=file.readln())!=null) {

If I change the first line with this one:

file.position=4;

The Bullseye starts working again as it should. So I think that it could be
something wrong in the file seeking functions.

I don't know if this is a bug, but it's actually so weird.

Saludos,
Carlos

HispaMSX BBS
Fidonet: 2:345/111
Redes integradas: HispaMSX, Fidonet, DOVE-Net


---
� Synchronet � HISPAMSX