aboutsummaryrefslogtreecommitdiff
path: root/engines/pink/file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/pink/file.cpp')
-rw-r--r--engines/pink/file.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/pink/file.cpp b/engines/pink/file.cpp
index 72de8ebdea..a62a9d83e2 100644
--- a/engines/pink/file.cpp
+++ b/engines/pink/file.cpp
@@ -99,10 +99,12 @@ void OrbFile::seekToObject(const char *name) {
seek(desc->objectsOffset);
}
+static int objDescComp(const void *a, const void *b) {
+ return scumm_stricmp((char *) a, (char *) b);
+}
+
ObjectDescription *OrbFile::getObjDesc(const char *name){
- ObjectDescription *desc = static_cast<ObjectDescription*>(bsearch(name, _table, _tableSize, sizeof(ObjectDescription),
- [] (const void *a, const void *b) {
- return scumm_stricmp((char *) a, (char *) b); }));
+ ObjectDescription *desc = (ObjectDescription*) bsearch(name, _table, _tableSize, sizeof(ObjectDescription), objDescComp);
assert(desc != nullptr);
return desc;
}