patch 8.2.0817: not enough memory allocated when converting string

Problem:    Not enough memory allocated when converting string with special
            character.
Solution:   Reserve space for modifier code. (closes #6130)
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index a8506a8..712aec4 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -2278,6 +2278,8 @@
   set encoding=utf8
   call assert_equal('a', nr2char(97, 1))
   call assert_equal('a', nr2char(97, 0))
+
+  call assert_equal("\x80\xfc\b\xf4\x80\xfeX\x80\xfeX\x80\xfeX", eval('"\<M-' .. nr2char(0x100000) .. '>"'))
 endfunc
 
 " Test for screenattr(), screenchar() and screenchars() functions