aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/XPM.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/XPM.cxx b/src/XPM.cxx
index 3bb23485b..36e7994f4 100644
--- a/src/XPM.cxx
+++ b/src/XPM.cxx
@@ -103,6 +103,11 @@ void XPM::Init(const char * const *linesForm) {
height = atoi(line0);
line0 = NextField(line0);
nColours = atoi(line0);
+ line0 = NextField(line0);
+ if (atoi(line0) != 1) {
+ // Only one char per pixel is supported
+ return;
+ }
codes = new char[nColours];
colours = new ColourPair[nColours];