Control: tags -1 -moreinfo +confirmed

Am 20.07.2017 um 19:29 schrieb Andrej Mernik:
[...]
> Hello,
> 
> the game is acting really weird on this. Some examples (yours included) do 
> not 
> cause infinite shield. Here are some that do:
> 
> mousetrap --geoweoiwei
> mousetrap --dhdh
> mousetrap --8bdhwd
> mousetrap --php
> mousetrap --a
> 
> I can reproduce this on Stretch 1.0c-1+b3
> 
> Best Regards,
> Andrej

Hello,

I could reproduce it with mousetrap --8bdhwd but failed with the two
commands before. I don't believe this issue is caused by passing random
parameters to mousetrap because I didn't spot anything unusual in
src/mousetrap.c. There you can find this code for example

    /* Cheat? */
    for ( int i = 1; i < argc; i++ )
    {
    if (strcmp(argv[i],"--cheat")== 0 )
     cheat += 1;
    if (strcmp(argv[i],"--no-sound")== 0 )
     g_silent += 1;
    if (strcmp(argv[i],"--silent")== 0 )
     g_silent += 1;
    }

All variables are initialized and the comparisons look ok.

But..

When I search for "shield" I see this:

/*
* Work out how long the time-based shield will last for.
*/
int percentageShield = 100 - (int)((sdlgt-dtime) / 40);
if ( percentageShield < 0 )
    percentageShield = 0;

I have no idea where sdlgt-dtime is coming from but it is not
initialized and this might cause this seemingly weird behavior. I need
to investigate this later.

Regards,

Markus




Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to