GetTypeNullValue() in slang_rs_reflection should take boolean type into consideration.
diff --git a/slang_rs_reflection.cpp b/slang_rs_reflection.cpp
index 635abcf..cbd276e 100644
--- a/slang_rs_reflection.cpp
+++ b/slang_rs_reflection.cpp
@@ -259,8 +259,12 @@
static const char *GetTypeNullValue(const RSExportType *ET) {
switch (ET->getClass()) {
case RSExportType::ExportClassPrimitive: {
- if (static_cast<const RSExportPrimitiveType*>(ET)->isRSObjectType())
+ const RSExportPrimitiveType *EPT =
+ static_cast<const RSExportPrimitiveType*>(ET);
+ if (EPT->isRSObjectType())
return "null";
+ else if (EPT->getType() == RSExportPrimitiveType::DataTypeBoolean)
+ return "false";
else
return "0";
break;