From: miha-q <> Date: Mon, 12 Feb 2024 16:55:56 +0000 (-0500) Subject: Mon Feb 12 11:55:56 AM EST 2024 X-Git-Url: http://www.foleosoft.com/?a=commitdiff_plain;h=a73e6464dd4b409036ce408b97fac4fa5967f150;p=QAnsel.git Mon Feb 12 11:55:56 AM EST 2024 --- diff --git a/src/QAnsel.c b/src/QAnsel.c index f2a81ec..e2ce18f 100644 --- a/src/QAnsel.c +++ b/src/QAnsel.c @@ -1295,7 +1295,7 @@ void process(int argc, char** argv) qansel_run(qubitCount, bitCount, instr, bitVect, instrLen, doDisplay); memcpy(instr, dat, instrLen * sizeof(QInstr)); uint16_t stat = 0; - for (uint8_t j = 0; j < bitCount; j++) + for (int8_t j = bitCount - 1; j >= 0; j--) { stat = (stat << 1) | bitVect[j]; }