Skip to content

Commit

Permalink
mark '$' as valid posix mangling char
Browse files Browse the repository at this point in the history
Fixes #8.
  • Loading branch information
nico committed Sep 3, 2019
1 parent ffc0c45 commit f1a071e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion demumble.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static void print_demangled(const char* format, const char* s) {

static bool is_mangle_char_posix(char c) {
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ||
(c >= '0' && c <= '9') || c == '_';
(c >= '0' && c <= '9') || c == '_' || c == '$';
}

static bool is_mangle_char_win(char c) {
Expand Down
2 changes: 2 additions & 0 deletions demumble_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
('demumble -mb < _Z1fv!foo_bar', '"f()" (_Z1fv)\n'),
('demumble --foo < bar', re.compile(".*unrecognized option `--foo'.*")),
('demumble -bx < bar', re.compile(".*unrecognized option `x' in `-bx'.*")),
('demumble < _ZZ3fooiENK3$_0clEi',
'foo(int)::$_0::operator()(int) const\n'),
]

status = 0
Expand Down

0 comments on commit f1a071e

Please sign in to comment.