From c551a7ee31696e62ee6a05d4505ff93cfca24112 Mon Sep 17 00:00:00 2001 From: Ingo Ruhnke Date: Sat, 3 Mar 2007 14:23:49 +0000 Subject: [PATCH] - added check for 'region' symbol SVN-Revision: 4909 --- src/lisp/lisp.hpp | 6 ++++++ src/tile.cpp | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lisp/lisp.hpp b/src/lisp/lisp.hpp index 38d6605d4..c65b2ea20 100644 --- a/src/lisp/lisp.hpp +++ b/src/lisp/lisp.hpp @@ -57,6 +57,12 @@ public: return true; } + std::string get_symbol() const + { + assert(type == TYPE_SYMBOL); + return v.string; + } + std::string get_string() const { assert(type == TYPE_STRING); diff --git a/src/tile.cpp b/src/tile.cpp index 3157c5104..c45f79c9c 100644 --- a/src/tile.cpp +++ b/src/tile.cpp @@ -116,7 +116,8 @@ Tile::parse_images(const lisp::Lisp& images_lisp) cur->get(file); imagespecs.push_back(ImageSpec(file, Rect(0, 0, 0, 0))); } else if(cur->get_type() == lisp::Lisp::TYPE_CONS && - cur->get_car()->get_type() == lisp::Lisp::TYPE_SYMBOL) { + cur->get_car()->get_type() == lisp::Lisp::TYPE_SYMBOL && + cur->get_car()->get_symbol() == "region") { const lisp::Lisp* ptr = cur->get_cdr(); std::string file; -- 2.11.0