diff --git a/PIL/XbmImagePlugin.py b/PIL/XbmImagePlugin.py index 604ba15a8..454a95534 100644 --- a/PIL/XbmImagePlugin.py +++ b/PIL/XbmImagePlugin.py @@ -26,8 +26,8 @@ from PIL import Image, ImageFile # XBM header xbm_head = re.compile( - b"\s*#define[ \t]+[^_]*_width[ \t]+(?P[0-9]+)[\r\n]+" - b"#define[ \t]+[^_]*_height[ \t]+(?P[0-9]+)[\r\n]+" + b"\s*#define[ \t]+.*_width[ \t]+(?P[0-9]+)[\r\n]+" + b"#define[ \t]+.*_height[ \t]+(?P[0-9]+)[\r\n]+" b"(?P" b"#define[ \t]+[^_]*_x_hot[ \t]+(?P[0-9]+)[\r\n]+" b"#define[ \t]+[^_]*_y_hot[ \t]+(?P[0-9]+)[\r\n]+"