Page 1 of 1

if () statement folding seems not to work correctly

Posted: Tue Feb 08, 2005 3:50 pm
by UdoJ
Hi Jussij,

It seems that there is a bug related to the folding of the if () statement (programming language: C).

Here is what I did:
I wrote a small stupid program to show the behavior:

Code: Select all

#include <StdIO.H>

void main (void)
{
  int         iTest = 0;

  printf ("Hello World!\n");

  if (iTest)
  {
    printf ("iTest: %d\n", iTest);
  }
}
I collapsed all and got the following:

Code: Select all

#include <StdIO.H>

void main (void)
{ ... }
Now I inserted another line:

Code: Select all

#include <StdIO.H>
#include <ConIO.H>

void main (void)
{ ... }
I saved the file. The Zeus view doesn't change but the contents of the file on the disk looked like that:

Code: Select all

#include <StdIO.H>
#include <ConIO.H>

void main (void)
{
  int         iTest = 0;

  printf ("Hello World!\n");

  if (iTest)
  { ... }
}
If I now close Zeus everything between the {} braces of the if statement is gone. The file on the disk looks like above.
It seems the file is only saved correctly if I make changes to the unfolded file.
This is really bad because if I forget to unfold the whole file I lose a lot of code.
Could you please check this.

Thanks Udo

Posted: Wed Feb 09, 2005 11:01 pm
by jussij
Hi Udo,
This is really bad because if I forget to unfold the whole file I lose a lot of code.
You have definitely found a bug and as point out this is a very dangerous and serious bug :(

The problem is that nested folds (ie folds inside a fold) are not being handled correctly.

A fix for this has been found and is currently being tested. Once the testing is complete a new executable will be made available to all registered users. I expect this to happen in the next day or so.

Cheers Jussi

Posted: Thu Feb 10, 2005 10:23 pm
by jussij
This bug has been fixed in the latest Zeus 3.94a release.

All registered 3.94 users have been sent an e-mail instructing them on how to get a free upgrade to this latest version.

Any registered 3.94 user who did not receive an e-mail should send their registration details to sales at zeusedit dot com and a upgrade will be made available.

Cheers Jussi