diff src/ops.c @ 2996:b9182da84c7e v7.3.270

updated for version 7.3.270 Problem: Illegal memory access. Solution: Swap conditions. (Dominique Pelle)
author Bram Moolenaar <bram@vim.org>
date Wed, 10 Aug 2011 12:11:01 +0200
parents fe6ad3fd8532
children d68f20a86a3e
line wrap: on
line diff
--- a/src/ops.c
+++ b/src/ops.c
@@ -6311,7 +6311,7 @@ line_count_info(line, wc, cc, limit, eol
     *wc += words;
 
     /* Add eol_size if the end of line was reached before hitting limit. */
-    if (line[i] == NUL && i < limit)
+    if (i < limit && line[i] == NUL)
     {
 	i += eol_size;
 	chars += eol_size;