mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Fixed an endless loop in cTextWrapper::Set() in case the given Width is smaller than one character
This commit is contained in:
		| @@ -3135,3 +3135,7 @@ Zoran Turalija <zoran.turalija@gmail.com> | ||||
|  for translating OSD texts to the Serbian language | ||||
|  for adding maximum SNR and signal strength value for TechniSat SkyStar HD2 | ||||
|  for pointing out that the language file sr_SR.po should be renamed to sr_RS.po | ||||
|  | ||||
| Stefan Braun <louis.braun@gmx.de> | ||||
|  for reporting an endless loop in cTextWrapper::Set() in case the given Width is smaller | ||||
|  than one character | ||||
|   | ||||
							
								
								
									
										4
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								HISTORY
									
									
									
									
									
								
							| @@ -7783,6 +7783,8 @@ Video Disk Recorder Revision History | ||||
| - Bumped all version numbers to 2.0.0. | ||||
| - Official release. | ||||
|  | ||||
| 2013-04-05: Version 2.0.1 | ||||
| 2013-04-07: Version 2.0.1 | ||||
|  | ||||
| - Fixed initializing cDevice::keepTracks. | ||||
| - Fixed an endless loop in cTextWrapper::Set() in case the given Width is smaller than | ||||
|   one character (reported by Stefan Braun). | ||||
|   | ||||
							
								
								
									
										5
									
								
								font.c
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								font.c
									
									
									
									
									
								
							| @@ -6,7 +6,7 @@ | ||||
|  * | ||||
|  * BiDi support by Osama Alrawab <alrawab@hotmail.com> @2008 Tripoli-Libya. | ||||
|  * | ||||
|  * $Id: font.c 2.13 2012/06/02 13:38:28 kls Exp $ | ||||
|  * $Id: font.c 2.13.1.1 2013/04/07 14:54:15 kls Exp $ | ||||
|  */ | ||||
|  | ||||
| #include "font.h" | ||||
| @@ -592,7 +592,7 @@ void cTextWrapper::Set(const char *Text, const cFont *Font, int Width) | ||||
|             p = Blank; | ||||
|             continue; | ||||
|             } | ||||
|          else { | ||||
|          else if (w > 0) { // there has to be at least one character before the newline | ||||
|             // Here's the ugly part, where we don't have any whitespace to | ||||
|             // punch in a newline, so we need to make room for it: | ||||
|             if (Delim) | ||||
| @@ -608,7 +608,6 @@ void cTextWrapper::Set(const char *Text, const cFont *Font, int Width) | ||||
|             continue; | ||||
|             } | ||||
|          } | ||||
|       else | ||||
|       w += cw; | ||||
|       if (strchr("-.,:;!?_", *p)) { | ||||
|          Delim = p; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user