From 263b447323d007014ea12f931be7d340846f531d Mon Sep 17 00:00:00 2001
From: David Lawrence Ramsey <pooka109@gmail.com>
Date: Wed, 23 Mar 2005 05:56:11 +0000
Subject: [PATCH] per Mike Frysinger's patch, in move_mbleft(), fix assert to
 reference the proper variable, so that nano builds with DEBUG defined again

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2422 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog   | 5 +++++
 src/chars.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 865dacd6..a7194f10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,11 @@ CVS code -
 	- After (re)initializing the terminal, make sure the cursor is
 	  always turned on.  Changes to do_alt_speller(),
 	  handle_sigwinch(), and main(). (DLR)
+- chars.c:
+  move_mbleft()
+	- Fix assert to reference the proper variable, so that nano
+	  builds with DEBUG defined again. (Mike Frysinger, found by
+	  Dmitri Vassilenko)
 - files.c:
   do_browser()
 	- Rename variable lineno to fileline to avoid confusion. (DLR)
diff --git a/src/chars.c b/src/chars.c
index c3e05ca2..eff45978 100644
--- a/src/chars.c
+++ b/src/chars.c
@@ -455,7 +455,7 @@ size_t move_mbleft(const char *buf, size_t pos)
 {
     size_t pos_prev = pos;
 
-    assert(str != NULL && pos <= strlen(buf));
+    assert(buf != NULL && pos <= strlen(buf));
 
     /* There is no library function to move backward one multibyte
      * character.  Here is the naive, O(pos) way to do it. */
-- 
GitLab