mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-04 01:39:16 +08:00
Do not swap endian elements with size == 1.
This commit is contained in:
parent
4e59d964dc
commit
71f578a198
@ -166,7 +166,7 @@ char* TFile::FGets(char* buffer, int buffer_size) {
|
||||
|
||||
int TFile::FReadEndian(void* buffer, size_t size, int count) {
|
||||
int num_read = FRead(buffer, size, count);
|
||||
if (swap_) {
|
||||
if (swap_ && size != 1) {
|
||||
char* char_buffer = static_cast<char*>(buffer);
|
||||
for (int i = 0; i < num_read; ++i, char_buffer += size) {
|
||||
ReverseN(char_buffer, size);
|
||||
|
Loading…
Reference in New Issue
Block a user