Skip to content

Commit

Permalink
Image format validation
Browse files Browse the repository at this point in the history
  • Loading branch information
guillep committed Jul 18, 2023
1 parent 5f06fb4 commit e4e051c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ PharoVMMaker >> generate: interpreterClass memoryManager: memoryManager compiler
| platformDirectory vmmaker imageReaderClassName imageWriterClassName |

imageFormatName := (Dictionary newFromPairs: options) at: 'ImageFormat' ifAbsent: [ imageFormatName ].
(#(SpurFormat ComposedFormat) includes: imageFormatName)
ifFalse:[ self error: 'Invalid Image Format'].
(#(SpurFormat ComposedFormat) includes: imageFormatName asSymbol)
ifFalse:[ self error: 'Invalid Image Format: ', imageFormatName].

imageFormatName = 'ComposedFormat'
ifTrue: [imageReaderClassName := ComposedImageReader name.
Expand Down

0 comments on commit e4e051c

Please sign in to comment.