Showing the changes to libraries/shared/src/OctalCode.cpp (1 of 7 files). Show all
Unified · Split
| @@ -63,6 +63,9 @@ int branchIndexWithDescendant(const unsigned char* ancestorOctalCode, const unsi · 62 unmodified lines | ||
| 63 | 63 | int parentSections = numberOfThreeBitSectionsInCode(ancestorOctalCode); |
| 64 | 64 | |
| 65 | 65 | int branchStartBit = parentSections * 3; |
| 66 | + // Note: this does not appear to be "multi-byte length code" safe. When octal codes are larger than 255 bytes | |
| 67 | + // long, the length code is stored in two bytes. The "1" below appears to assume that the length is always one | |
| 68 | + // byte long. | |
| 66 | 69 | return sectionValue(descendantOctalCode + 1 + (branchStartBit / 8), branchStartBit % 8); |
| 67 | 70 | } |
| 68 | 71 | |