diff options
| -rw-r--r-- | libs/utils/ResourceTypes.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libs/utils/ResourceTypes.cpp b/libs/utils/ResourceTypes.cpp index 0831f4a0c0..f80843d8dc 100644 --- a/libs/utils/ResourceTypes.cpp +++ b/libs/utils/ResourceTypes.cpp @@ -3284,7 +3284,16 @@ bool ResTable::collectString(String16* outString, break; } if (c == '\'' && (quoted == 0 || quoted == '\'')) { - break; + /* + * In practice, when people write ' instead of \' + * in a string, they are doing it by accident + * instead of really meaning to use ' as a quoting + * character. Warn them so they don't lose it. + */ + if (outErrorMsg) { + *outErrorMsg = "Apostrophe not preceded by \\"; + } + return false; } } p++; |