To: vim_dev@googlegroups.com Subject: Patch 7.3.689 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.689 Problem: MzScheme and Lua may use a NULL string. Solution: Use an empty string instead of NULL. (Yukihiro Nakadaira) Files: src/if_lua.c, src/if_mzsch.c *** ../vim-7.3.688/src/if_lua.c 2012-06-29 12:54:32.000000000 +0200 --- src/if_lua.c 2012-10-14 03:33:32.000000000 +0200 *************** *** 464,470 **** switch (tv->v_type) { case VAR_STRING: ! lua_pushstring(L, (char *) tv->vval.v_string); break; case VAR_NUMBER: lua_pushinteger(L, (int) tv->vval.v_number); --- 464,471 ---- switch (tv->v_type) { case VAR_STRING: ! lua_pushstring(L, tv->vval.v_string == NULL ! ? "" : (char *)tv->vval.v_string); break; case VAR_NUMBER: lua_pushinteger(L, (int) tv->vval.v_number); *** ../vim-7.3.688/src/if_mzsch.c 2012-02-12 01:55:50.000000000 +0100 --- src/if_mzsch.c 2012-10-14 03:33:32.000000000 +0200 *************** *** 2649,2655 **** new_value = FALSE; else if (vim_value->v_type == VAR_STRING) { ! result = scheme_make_string((char *)vim_value->vval.v_string); MZ_GC_CHECK(); } else if (vim_value->v_type == VAR_NUMBER) --- 2649,2656 ---- new_value = FALSE; else if (vim_value->v_type == VAR_STRING) { ! result = scheme_make_string(vim_value->vval.v_string == NULL ! ? "" : (char *)vim_value->vval.v_string); MZ_GC_CHECK(); } else if (vim_value->v_type == VAR_NUMBER) *** ../vim-7.3.688/src/version.c 2012-10-14 03:22:49.000000000 +0200 --- src/version.c 2012-10-14 03:33:49.000000000 +0200 *************** *** 721,722 **** --- 721,724 ---- { /* Add new patch number below this line */ + /**/ + 689, /**/ -- Computers make very fast, very accurate, mistakes. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///