File: yudit-2.7.2.patch3.txt
Emergency: medium
Usage: patch -p0 < yudit-2.7.2.patch3.txt
From: Gaspar Sinai <gsinai@yudit.org>
Date: Tokyo 2002-12-16

This patch fixes what patch1 and patch2 breaks :)
Expand broke in the text buffer after patch1 and patch2.

*** yudit-2.7.2/stoolkit/SParagraph.cpp-	Mon Dec 16 18:31:39 2002
--- yudit-2.7.2/stoolkit/SParagraph.cpp	Mon Dec 16 19:50:22 2002
***************
*** 133,139 ****
    SParagraph* p = (SParagraph*) this; /* we are not const */
    SVector<SGlyph> gl;
-   unsigned int end = split (ucs4Glyphs, &gl, 0);
  
!   if (end != ucs4Glyphs.size()) 
    {
      fprintf (stderr, "SParagraph::expand() internal error\n");
--- 133,141 ----
    SParagraph* p = (SParagraph*) this; /* we are not const */
    SVector<SGlyph> gl;
  
!   SV_UCS4 chrs = getChars();
!   unsigned int end = split (chrs, &gl, 0);
! 
!   if (end != chrs.size()) 
    {
      fprintf (stderr, "SParagraph::expand() internal error\n");
***************
*** 341,345 ****
      unsigned int len = ucs4Glyphs.size();
      ret = ucs4Glyphs;
!     if (len >= 2 && ret[len-2] == SD_CD_CR && ret[len-1] == SD_CD_LF)
      {
        /* no change */
--- 343,350 ----
      unsigned int len = ucs4Glyphs.size();
      ret = ucs4Glyphs;
!     if (paraSep == SS_PS_None) {
!       return SV_UCS4(ret);
!     }
!     else if (len >= 2 && ret[len-2] == SD_CD_CR && ret[len-1] == SD_CD_LF)
      {
        /* no change */
