Merge pull request #2390 from nbp/extra-font-optim
Ensure Type1Parser_extractFontProgram loop counter is not interpreted as a double.
This commit is contained in:
		
						commit
						ae621701c6
					
				| @ -4755,7 +4755,9 @@ var Type1Parser = function type1Parser() { | |||||||
|         i += length; |         i += length; | ||||||
|         token = ''; |         token = ''; | ||||||
|       } else if (isSeparator(c)) { |       } else if (isSeparator(c)) { | ||||||
|         length = parseInt(token, 10); |         // Use '| 0' to prevent setting a double into length such as the double
 | ||||||
|  |         // does not flow into the loop variable.
 | ||||||
|  |         length = parseInt(token, 10) | 0; | ||||||
|         token = ''; |         token = ''; | ||||||
|       } else { |       } else { | ||||||
|         token += c; |         token += c; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user