Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
464c956a
Commit
464c956a
authored
Jul 24, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libwine: Fix the wctomb validity check for codepages where the default chars…
libwine: Fix the wctomb validity check for codepages where the default chars don't convert to each other.
parent
c6570a50
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
wctomb.c
libs/wine/wctomb.c
+4
-5
No files found.
libs/wine/wctomb.c
View file @
464c956a
...
...
@@ -69,9 +69,9 @@ WCHAR compose( const WCHAR *str )
static
inline
int
is_valid_sbcs_mapping
(
const
struct
sbcs_table
*
table
,
int
flags
,
WCHAR
wch
,
unsigned
char
ch
)
{
if
(
flags
&
WC_NO_BEST_FIT_CHARS
)
return
(
table
->
cp2uni
[
ch
]
==
wch
);
if
(
ch
!=
(
unsigned
char
)
table
->
info
.
def_char
)
return
1
;
return
(
wch
==
table
->
info
.
def_unicode_char
)
;
if
(
(
flags
&
WC_NO_BEST_FIT_CHARS
)
||
ch
==
(
unsigned
char
)
table
->
info
.
def_char
)
return
(
table
->
cp2uni
[
ch
]
==
wch
)
;
return
1
;
}
/* query necessary dst length for src string */
...
...
@@ -262,8 +262,7 @@ static int wcstombs_sbcs_slow( const struct sbcs_table *table, int flags,
static
inline
int
is_valid_dbcs_mapping
(
const
struct
dbcs_table
*
table
,
int
flags
,
WCHAR
wch
,
unsigned
short
ch
)
{
if
(
ch
==
table
->
info
.
def_char
&&
wch
!=
table
->
info
.
def_unicode_char
)
return
0
;
if
(
flags
&
WC_NO_BEST_FIT_CHARS
)
if
((
flags
&
WC_NO_BEST_FIT_CHARS
)
||
ch
==
table
->
info
.
def_char
)
{
/* check if char maps back to the same Unicode value */
if
(
ch
&
0xff00
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment