From 49631972db5b965413d4bbe36983a8d5bd203183 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 2 Apr 2017 06:23:19 +0300 Subject: Use pathJoin for concatinate some paths. --- src/resources/item/item.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/resources/item') diff --git a/src/resources/item/item.cpp b/src/resources/item/item.cpp index 99fed928d..d738ca0e3 100644 --- a/src/resources/item/item.cpp +++ b/src/resources/item/item.cpp @@ -97,15 +97,15 @@ void Item::setId(const int id, const ItemInfo &info = getInfo(); mTags = info.getTags(); - const std::string dye = combineDye2(paths.getStringValue( - "itemIcons").append(info.getDisplay().image), + const std::string dye = combineDye2(pathJoin( + paths.getStringValue("itemIcons"), info.getDisplay().image), info.getDyeIconColorsString(color)); mImage = Loader::getImage(dye); if (!mImage) { mImage = Theme::getImageFromTheme(paths.getValue("unknownItemFile", - "unknown-item.png")); + "unknown-item.png")); } } @@ -121,8 +121,8 @@ Image *Item::getImage(const int id, const ItemColor color) { const ItemInfo &info = ItemDB::get(id); - Image *image = Loader::getImage(combineDye2(paths.getStringValue( - "itemIcons").append(info.getDisplay().image), + Image *image = Loader::getImage(combineDye2(pathJoin(paths.getStringValue( + "itemIcons"), info.getDisplay().image), info.getDyeIconColorsString(color))); if (!image) -- cgit v1.2.3-70-g09d2