mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
LibGUI: Remove unnecessary type cast in JsonArrayModel.
Since TCP sequence numbers are randomly choosen 32-bit numbers, it often happend that the most significant bit was set. The cast to a 32-bit signed integer then made the number negative. Thus TCP sequence were shown negative in the SystemMonitor every so often.
This commit is contained in:
parent
3ce97b9c0e
commit
03a27bc693
Notes:
sideshowbarker
2024-07-19 02:19:13 +09:00
Author: https://github.com/asynts
Commit: 03a27bc693
Pull-request: https://github.com/SerenityOS/serenity/pull/3566
2 changed files with 2 additions and 2 deletions
|
@ -107,7 +107,7 @@ Variant JsonArrayModel::data(const ModelIndex& index, ModelRole role) const
|
|||
if (field_spec.massage_for_display)
|
||||
return field_spec.massage_for_display(object);
|
||||
if (data.is_number())
|
||||
return data.to_i32();
|
||||
return data;
|
||||
return object.get(json_field_name).to_string();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue