Skip to content

Conversation

jedi7
Copy link
Contributor

@jedi7 jedi7 commented Jan 15, 2023

  • Key inst_volume_0 is now unique

Fast fix. Will be nice to find a better solution to provide variable arguments to the append_str.

Previous keys:
"inst_volume_0" : "6.257 m3", "inst_volume_0" : "6.116 m3", "inst_volume_1" : "5.764 m3", "inst_volume_2" : "5.494 m3",
...

New keys:
"inst_volume_0" : "6.257 m3", "inst_volume_m1_0" : "6.116 m3", "inst_volume_m2_1" : "5.764 m3", "inst_volume_m3_2" :
...

@zuckschwerdt
Copy link
Collaborator

Thanks, looks great. It might be better to safe-guard
if (key_extra[0] == '\0') and if (pretty_extra[0] == '\0')
as if (!key_extra || !*key_extra) and if (!pretty_extra || !*pretty_extra)
because we do allow at least pretty_key to be NULL safely.
(this !x || !*x is the idiom we typically use for "is empty".)

* Key inst_volume_0 is now unique
@jedi7 jedi7 force-pushed the bugfix/wmbus_json_keys_unique branch from 3aca595 to ecaf286 Compare January 16, 2023 07:05
@jedi7
Copy link
Contributor Author

jedi7 commented Jan 16, 2023

updated :) thanks for review

@zuckschwerdt zuckschwerdt merged commit d287cfb into merbanan:master Jan 16, 2023
obones pushed a commit to obones/rtl_433 that referenced this pull request Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants