SHARE
TWEET

MenuEx_ampersand_fix.patch

a guest Oct 11th, 2019 100 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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) {
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top