From a4cf66d13c5ccf2147b198d181ea8de2a428107f Mon Sep 17 00:00:00 2001
From: Itay Cohen <itaycohen23@gmail.com>
Date: Wed, 15 Apr 2020 19:20:57 +0300
Subject: [PATCH] Resource names are strings (#2151)

---
 src/core/Cutter.cpp             | 2 +-
 src/core/CutterDescriptions.h   | 2 +-
 src/widgets/ResourcesWidget.cpp | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/core/Cutter.cpp b/src/core/Cutter.cpp
index 3b479938..da280859 100644
--- a/src/core/Cutter.cpp
+++ b/src/core/Cutter.cpp
@@ -3121,7 +3121,7 @@ QList<ResourcesDescription> CutterCore::getAllResources()
 
         ResourcesDescription res;
 
-        res.name = resourceObject[RJsonKey::name].toInt();
+        res.name = resourceObject[RJsonKey::name].toString();
         res.vaddr = resourceObject[RJsonKey::vaddr].toVariant().toULongLong();
         res.index = resourceObject[RJsonKey::index].toVariant().toULongLong();
         res.type = resourceObject[RJsonKey::type].toString();
diff --git a/src/core/CutterDescriptions.h b/src/core/CutterDescriptions.h
index 2087640e..5f748ebb 100644
--- a/src/core/CutterDescriptions.h
+++ b/src/core/CutterDescriptions.h
@@ -239,7 +239,7 @@ struct AnalVTableDescription {
 };
 
 struct ResourcesDescription {
-    int name;
+    QString name;
     RVA vaddr;
     ut64 index;
     QString type;
diff --git a/src/widgets/ResourcesWidget.cpp b/src/widgets/ResourcesWidget.cpp
index 026a3a26..9bc23028 100644
--- a/src/widgets/ResourcesWidget.cpp
+++ b/src/widgets/ResourcesWidget.cpp
@@ -27,7 +27,7 @@ QVariant ResourcesModel::data(const QModelIndex &index, int role) const
     case Qt::DisplayRole:
         switch (index.column()) {
         case NAME:
-            return QString::number(res.name);
+            return res.name;
         case VADDR:
             return RAddressString(res.vaddr);
         case INDEX: