Commit 538f1b151dd71fa9c105bbba5c80fcc9563f6f80
Fix crashes in pdcurses on Windows ANSI terms
Invalid condition resulted in a loop advancing through output buffer
while not making any progress through the input one, eventually reaching
end of thread's stack and generating a #GP exception on attempting to
write to guard page.
Thanks to Phil Runninger.
Fixes #1067 on GitHub.
Author: xaizek
Author date (UTC): 2025-03-28 13:37
Committer name: xaizek
Committer date (UTC): 2025-03-28 13:37
Parent(s): 5d0b9f8c04c389911cfab197903b0f90de2b0537
Signing key: 99DC5E4DB05F6BE2
Tree: 0b7c9100a1fe5492c2c4ccd945d6bda5cf4d76ad
| File ChangeLog changed (mode: 100644) (index 65df35988..4f1e3c5f4) | 
	| 28 | 
	28 | 
	 | 
	 | 
	| 29 | 
	29 | 
		Fixed :restart not resetting abbreviations. | 
		Fixed :restart not resetting abbreviations. | 
	| 30 | 
	30 | 
	 | 
	 | 
	 | 
	31 | 
	 | 
		Fixed crashes in terminals that handle ANSI output on Windows when | 
	 | 
	32 | 
	 | 
		previewing binary or some complicated UTF-8 text files.  Thanks to Phil | 
	 | 
	33 | 
	 | 
		Runninger. | 
	 | 
	34 | 
	 | 
	 | 
	| 31 | 
	35 | 
	0.14-beta to 0.14 (2025-02-08) | 
	0.14-beta to 0.14 (2025-02-08) | 
	| 32 | 
	36 | 
	 | 
	 | 
	| 33 | 
	37 | 
		Improved documentation on zh/zl menu keys a bit. | 
		Improved documentation on zh/zl menu keys a bit. | 
| File patches/pdcurses39/pdcurses-10-Improve-wide-CJK-characters-handling-on-Windows.patch changed (mode: 100644) (index 11edc1aba..c370a5ff7) | 
	| ... | 
	... | 
	index 14418396..e3902c1e 100644 | 
	| 41 | 
	41 | 
	+            // handling them in any special way.  However, need to jump over the | 
	+            // handling them in any special way.  However, need to jump over the | 
	| 42 | 
	42 | 
	+            // padding when drawing things to avoid having it in the output. | 
	+            // padding when drawing things to avoid having it in the output. | 
	| 43 | 
	43 | 
	+            int char_width = compat_wcwidth(buffer[buf_len]); | 
	+            int char_width = compat_wcwidth(buffer[buf_len]); | 
	| 44 | 
	 | 
	+            if (char_width < 0) | 
	 | 
	 | 
	44 | 
	 | 
	+            if (char_width <= 0) | 
	| 45 | 
	45 | 
	+                char_width = 1; | 
	+                char_width = 1; | 
	| 46 | 
	46 | 
	+            j += char_width - 1; | 
	+            j += char_width - 1; | 
	| 47 | 
	47 | 
	+ | 
	+ |