From 1057cb3e3ca2c513f6757c4448cc35075084520c Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sun, 24 Dec 2023 04:36:51 +0800 Subject: [PATCH] Set serial on Rust binding --- native/src/core/resetprop/resetprop.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/native/src/core/resetprop/resetprop.cpp b/native/src/core/resetprop/resetprop.cpp index eee7421d5..74e1507cd 100644 --- a/native/src/core/resetprop/resetprop.cpp +++ b/native/src/core/resetprop/resetprop.cpp @@ -138,9 +138,10 @@ struct prop_to_string : prop_cb { uint32_t serial; }; -template<> void prop_to_string::exec(const char *, const char *value, uint32_t) { +template<> void prop_to_string::exec(const char *, const char *value, uint32_t s) { // We do not want to crash when values are not UTF-8 val = rust::String::lossy(value); + serial = s; } static int set_prop(const char *name, const char *value, PropFlags flags) {