diff options
| author | Alvin Penner <penner@vaxxine.com> | 2012-10-10 22:26:40 +0000 |
|---|---|---|
| committer | apenner <penner@vaxxine.com> | 2012-10-10 22:26:40 +0000 |
| commit | df6576d515c2618b9bc79226e6164e7d935a508b (patch) | |
| tree | 64726826c93e6508761e58c6a0641d55ed26f5f7 /src | |
| parent | powerstroke: fix stuff! (apparently commit didn't work yesterday) (diff) | |
| download | inkscape-df6576d515c2618b9bc79226e6164e7d935a508b.tar.gz inkscape-df6576d515c2618b9bc79226e6164e7d935a508b.zip | |
emf import. re-implement filtering of isolated control characters (Bug 217231)
Fixed bugs:
- https://launchpad.net/bugs/217231
(bzr r11775)
Diffstat (limited to 'src')
| -rw-r--r-- | src/extension/internal/emf-win32-inout.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/extension/internal/emf-win32-inout.cpp b/src/extension/internal/emf-win32-inout.cpp index 2097402c7..872de045a 100644 --- a/src/extension/internal/emf-win32-inout.cpp +++ b/src/extension/internal/emf-win32-inout.cpp @@ -1905,6 +1905,10 @@ myEnhMetaFileProc(HDC /*hDC*/, HANDLETABLE * /*lpHTable*/, ENHMETARECORD const * (gchar *) g_utf16_to_utf8( (gunichar2 *) wide_text, pEmr->emrtext.nChars, NULL, NULL, NULL ); if (ansi_text) { + if ((wide_text[0] < 32) && (strlen(ansi_text) == 1)) { + g_free(ansi_text); // filter out isolated control characters + ansi_text = g_strdup(""); + } // gchar *p = ansi_text; // while (*p) { // if (*p < 32 || *p >= 127) { |
