Fix odd-nibble encoding issue

This commit is contained in:
Stefan `Sec` Zehl 2011-05-23 02:35:02 +02:00
parent 8b3d277a29
commit 05770bdd7b
1 changed files with 2 additions and 1 deletions

View File

@ -11,10 +11,11 @@ static uint8_t buf[MAXCHR];
char gnn(){ // Get next nibble char gnn(){ // Get next nibble
static int byte; static int byte;
int val; int val;
if(hilo==1)
ctr++;
hilo=1-hilo; hilo=1-hilo;
if(hilo==1){ if(hilo==1){
byte=data[ctr]; byte=data[ctr];
ctr++;
val=byte>>4; val=byte>>4;
}else{ }else{
val=byte&0x0f; val=byte&0x0f;