Advertisement
Guest User

MenuEx_ampersand_fix.patch

a guest
Oct 11th, 2019
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.64 KB | None | 0 0
  1. Index: src/apps/mplayerc/controls/MenuEx.cpp
  2. ===================================================================
  3. --- src/apps/mplayerc/controls/MenuEx.cpp   (revision 4819)
  4. +++ src/apps/mplayerc/controls/MenuEx.cpp   (working copy)
  5. @@ -237,9 +237,14 @@
  6.     CString strR;
  7.     CString str = lpItem->strText;
  8.     if (bNoAccel) {
  9. -       str.Replace(L"&&", L"{{amp}}");
  10. -       str.Remove(L'&');
  11. -       str.Replace(L"{{amp}}", L"&&");
  12. +       int pos = 0;
  13. +       while ((pos = str.Find('&', pos)) >= 0) {
  14. +           if (str.GetAt(pos + 1) != '&') {
  15. +               str.SetAt(pos, 0x16);
  16. +           }
  17. +           pos += 2;
  18. +       }
  19. +       str.Remove(0x16);
  20.     }
  21.     const int pos = str.Find('\t');
  22.     if (pos > 0) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement