]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - form/frm_driver.c
ncurses 5.9 - patch 20130805
[ncurses.git] / form / frm_driver.c
index 6390bdeee37bcd7ef75ba39d3cc5dc8339523e16..9131edf57a035ed2dc0a4966e02382c743810f96 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -32,7 +32,7 @@
 
 #include "form.priv.h"
 
-MODULE_ID("$Id: frm_driver.c,v 1.102 2012/07/21 23:23:08 tom Exp $")
+MODULE_ID("$Id: frm_driver.c,v 1.104 2013/06/22 20:02:55 tom Exp $")
 
 /*----------------------------------------------------------------------------
   This is the core module of the form library. It contains the majority
@@ -1211,7 +1211,7 @@ Synchronize_Linked_Fields(FIELD *field)
     return (E_SYSTEM_ERROR);
 
   for (linked_field = field->link;
-       linked_field != field;
+       (linked_field != field) && (linked_field != 0);
        linked_field = linked_field->link)
     {
       if (((syncres = Synchronize_Field(linked_field)) != E_OK) &&
@@ -4534,7 +4534,7 @@ field_buffer(const FIELD *field, int buffer)
 
              init_mb(state);
              next = _nc_wcrtomb(0, data[n].chars[0], &state);
-             if (!isEILSEQ(next))
+             if (next > 0)
                need += next;
            }
        }