From 3e8674941dbb2ae7842dc74ee4f87f7564b7d496 Mon Sep 17 00:00:00 2001 From: Brian Conry Date: Tue, 15 Feb 2022 08:05:04 -0600 Subject: [PATCH] Use magic numbers to detect xbm files --- Graph.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Graph.pm b/Graph.pm index 5a3b384..9df4e28 100644 --- a/Graph.pm +++ b/Graph.pm @@ -347,7 +347,8 @@ sub _read_logo_file pack("H8",'ffd8ffe0') => "jpeg", 'GIF8' => "gif", '.PNG' => "png", - '/* X'=> "xpm", # technically '/* XPM */', but I'm hashing, here + '/* X' => "xpm", # technically '/* XPM */', but I'm hashing, here + '#def' => "xbm", ); if (my $match = $magic{ substr $logodata, 0, 4 }) { push @tried, $match;