taisel / GameBoy-Online

JavaScript GameBoy Color emulator.
http://taisel.github.io/GameBoy-Online/
593 stars 175 forks source link

A bug in the code. #14

Open JacksonGL opened 7 years ago

JacksonGL commented 7 years ago

There is probably a bug here.

if (sixbits[3] >= 0x40) {
    decode64.length -= 1;  // no side effect
    if (sixbits[2] >= 0x40) {
        decode64.length -= 1; // no side effect
    }
}

decode64 is a primitive string value. Decreasing its length property has no side effect: it won't throw away the last character.