This repository was archived by the owner on Sep 26, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 23
23
* License for the specific language governing permissions and limitations
24
24
* under the License.
25
25
*
26
- * Version: $Id: sc1.c 6932 2023-04-03 13:56:19Z thiadmer $
26
+ * Version: $Id: sc1.c 6965 2023-07-20 15:44:35Z thiadmer $
27
27
*/
28
28
#include <assert.h>
29
29
#include <ctype.h>
@@ -592,6 +592,7 @@ int pc_compile(int argc, char *argv[])
592
592
if (inpf_org == NULL )
593
593
error (100 ,inpfname );
594
594
freading = TRUE;
595
+ sc_is_utf8 = (short )scan_utf8 (inpf_org ,inpfname );
595
596
outf = (FILE * )pc_openasm (outfname ); /* first write to assembler file (may be temporary) */
596
597
if (outf == NULL )
597
598
error (101 ,outfname );
Original file line number Diff line number Diff line change 12
12
* is allocated statically, so loading SBCS tables cannot fail (if the tables
13
13
* themselves are valid, of course).
14
14
*
15
- * Copyright (c) CompuPhase, 2004-2016
15
+ * Copyright (c) CompuPhase, 2004-2023
16
16
*
17
17
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
18
18
* use this file except in compliance with the License. You may obtain a copy
26
26
* License for the specific language governing permissions and limitations
27
27
* under the License.
28
28
*
29
- * Version: $Id: sci18n.c 6932 2023-04-03 13:56:19Z thiadmer $
29
+ * Version: $Id: sci18n.c 6965 2023-07-20 15:44:35Z thiadmer $
30
30
*/
31
31
#include <assert.h>
32
32
#include <stdio.h>
@@ -413,8 +413,8 @@ SC_FUNC int scan_utf8(FILE *fp,const char *filename)
413
413
} /* while */
414
414
pc_resetsrc (fp ,resetpos );
415
415
if (bom_found ) {
416
- unsigned char bom [3 ];
417
- pc_readsrc (fp ,bom ,3 ); /* read the BOM again to strip it from the file */
416
+ unsigned char bom [4 ];
417
+ pc_readsrc (fp ,bom ,4 ); /* read the BOM again to strip it from the file */
418
418
assert (bom [0 ]== 0xef && bom [1 ]== 0xbb && bom [2 ]== 0xbf );
419
419
if (!utf8 )
420
420
error (77 ,filename ); /* malformed UTF-8 encoding */
You can’t perform that action at this time.
0 commit comments