Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use system library function to byte swap VCT short channel name.
Qt 6.1 added overloads to the QChar constructor that catch an int or uint argument, and use an assert to validate that the passed value fits in 16 bits. The current implementation calls the uint version of the constructor, and will crash if it is ever passed a number outside of the range 0-65535, which means passing the number -1 will cause a crash. Converting the exiting manual byte swap to use be16toh() serves two purposes. First it guarantees that the result is a uint16_t and therefore can't trigger the assert. Second, it should result in correct values if this code is ever compiled on a big-endian system.
- Loading branch information