mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 08:37:19 +02:00
Merge pull request #524 from ey6es/master
Fix for voxel screwiness on pressing delete/backspace in the chat entry field.
This commit is contained in:
commit
211b638701
1 changed files with 2 additions and 2 deletions
|
@ -102,12 +102,12 @@ void setAtBit(unsigned char& byte, int bitIndex) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int getSemiNibbleAt(unsigned char& byte, int bitIndex) {
|
int getSemiNibbleAt(unsigned char& byte, int bitIndex) {
|
||||||
return (byte >> (7 - bitIndex) & 3); // semi-nibbles store 00, 01, 10, or 11
|
return (byte >> (6 - bitIndex) & 3); // semi-nibbles store 00, 01, 10, or 11
|
||||||
}
|
}
|
||||||
|
|
||||||
void setSemiNibbleAt(unsigned char& byte, int bitIndex, int value) {
|
void setSemiNibbleAt(unsigned char& byte, int bitIndex, int value) {
|
||||||
//assert(value <= 3 && value >= 0);
|
//assert(value <= 3 && value >= 0);
|
||||||
byte += ((value & 3) << (7 - bitIndex)); // semi-nibbles store 00, 01, 10, or 11
|
byte += ((value & 3) << (6 - bitIndex)); // semi-nibbles store 00, 01, 10, or 11
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue