History

Fix get_tok_str wrt wide characters

Fixes both, character constants and string literals.

Daniel Glöckner committed 17 years ago

Commit 5fd6f7b1 parent deb41071 file · +4 −2Browse files

Unified · Split

tcc.c+4−2
@@ -1770,8 +1770,9 @@ char *get_tok_str(int v, CValue *cv) · 1769 unmodified lines
17701770 /* XXX: not quite exact, but only useful for testing */
17711771 sprintf(p, "%Lu", cv->ull);
17721772 break;
1773− case TOK_CCHAR:
17741773 case TOK_LCHAR:
1774+ cstr_ccat(&cstr_buf, 'L');
1775+ case TOK_CCHAR:
17751776 cstr_ccat(&cstr_buf, '\'');
17761777 add_char(&cstr_buf, cv->i);
17771778 cstr_ccat(&cstr_buf, '\'');
@@ -1784,8 +1785,9 @@ char *get_tok_str(int v, CValue *cv) · 6 unmodified lines
17841785 add_char(&cstr_buf, ((unsigned char *)cstr->data)[i]);
17851786 cstr_ccat(&cstr_buf, '\0');
17861787 break;
1787− case TOK_STR:
17881788 case TOK_LSTR:
1789+ cstr_ccat(&cstr_buf, 'L');
1790+ case TOK_STR:
17891791 cstr = cv->cstr;
17901792 cstr_ccat(&cstr_buf, '\"');
17911793 if (v == TOK_STR) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t