FLTK logo

[master] 1008cdf - Remove duplicate BOM check (#247)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 1008cdf - Remove duplicate BOM check (#247) "Albrecht Schlosser" Jul 04, 2021  
 
commit 1008cdfab27609a6f6a0e82dadad9fd9cbd8a66d
Author:     Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Sun Jul 4 16:13:09 2021 +0200
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Sun Jul 4 16:13:09 2021 +0200

    Remove duplicate BOM check (#247)
    
    Sorry for the noise, this was a "merge error".
    
    Also, fix a typo.

 src/fl_images_core.cxx | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git src/fl_images_core.cxx src/fl_images_core.cxx
index 41e75de..07224fa 100644
--- src/fl_images_core.cxx
+++ src/fl_images_core.cxx
@@ -138,16 +138,10 @@ fl_check_images(const char *name,               // I - Filename
     }
   } // gzip'ed data
 # endif // HAVE_LIBZ
-  // check for presence of Byte Order Mark (BOM)
-  char utf8[4];
-  int lutf8 = fl_utf8encode(0xFEFF /* BOM in Unicode */, utf8);
-  if (memcmp(buf, utf8, lutf8) == 0) {
-    buf += lutf8; count -= lutf8;
-  }
 
   // Check if we have a UTF-8 BOM in the first three bytes (issue #247).
   // If yes we need at least 5 more bytes to recognize the signature.
-  // Note: BOM (Byte Order Marker) in UTF-8 is not recommended but allowed.
+  // Note: BOM (Byte Order Mark) in UTF-8 is not recommended but allowed.
 
   if (count >= 8) {
     const uchar bom[3] = { 0xef, 0xbb, 0xbf };
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.