Re: Installing Phix

new topic     » goto parent     » topic index » view thread      » older message » newer message

Thanks, that's really helpful.

I have reproduced something similar with the following code:

atom lpData = allocate(10) 
object data = peek({lpData,-1}) 

I need to work on improving the error handling of that, which will probably mean a new error code and a new version of phix.

In the meantime, although I cannot be absolutely certain, this should help:

In demo\pGUI\pdemo\setup.exw, function KeyValue2 line 385, add the sanity check:

 
            data_len = peek4u(lpcbData) 
if data_len<=0 then ?9/0 end if 
            lpData = allocate(data_len) 

and in the same function line 403, replace one line with five:

                end while 
--              data = peek({lpData,data_len}) 
                if data_len<=0 then 
                    data  = "" 
                else 
                    data = peek({lpData,data_len}) 
                end if 

p pdemo should then at least get a bit further along.

Should that first sanity check trigger, try replacing it with

if data_len<0 then data_len = 0 end if 

It may also help to replace the preceding line 399:

--              while 1 do 
                while data_len>0 do 

Regards, Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu