This is an automated email from the ASF dual-hosted git repository.
shanedell pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/daffodil-vscode.git
The following commit(s) were added to refs/heads/main by this push:
new 1833bf0 Fix Issue of Byte Value 0 to Display Null
1833bf0 is described below
commit 1833bf04fd930005e1550ed5bfc657aabb8ddf59
Author: Robert Strickland <[email protected]>
AuthorDate: Mon Aug 28 13:58:31 2023 -0500
Fix Issue of Byte Value 0 to Display Null
Closes #827
---
.../DataDisplays/CustomByteDisplay/DataLineFeed.svelte | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git
a/src/svelte/src/components/DataDisplays/CustomByteDisplay/DataLineFeed.svelte
b/src/svelte/src/components/DataDisplays/CustomByteDisplay/DataLineFeed.svelte
index 7d4d08d..5400cc9 100644
---
a/src/svelte/src/components/DataDisplays/CustomByteDisplay/DataLineFeed.svelte
+++
b/src/svelte/src/components/DataDisplays/CustomByteDisplay/DataLineFeed.svelte
@@ -261,7 +261,10 @@ limitations under the License.
let byteOffset = viewportLineOffset + bytePos
bytes.push({
offset: byteOffset,
- value: viewportData.data[byteOffset],
+ value:
+ viewportData.data[byteOffset] !== undefined
+ ? viewportData.data[byteOffset]
+ : -1,
text:
byteOffset < viewportData.length
? byte_value_string(viewportData.data[byteOffset], dataRadix)
@@ -524,7 +527,7 @@ limitations under the License.
id={'physical'}
radix={dataRadix}
width={byteElementWidth}
- disabled={!byte.value}
+ disabled={byte.value === -1}
bind:selectionData={$selectionDataStore}
on:mouseup={mouseup}
on:mousedown={mousedown}
@@ -545,7 +548,7 @@ limitations under the License.
id={'logical'}
radix={dataRadix}
width={byteElementWidth}
- disabled={!byte.value}
+ disabled={byte.value === -1}
bind:selectionData={$selectionDataStore}
on:mouseup={mouseup}
on:mousedown={mousedown}