ambiguity between binary and integer for flagtable's value datafile loading

Bug #1279372 reported by vanh souvanlasy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libECBUFR
Fix Committed
Medium
vanh souvanlasy

Bug Description

When loading a datafile, the string representing a value for a flagtable can either be in binary form or integer.
There is a problem if the integer form is used, and the integer value only have 1 and 0 in it.
Which will be considered as a binary and read as a binary which is wrong.
Example: 1101 is loaded as 13 instead.

The workaround is avoid using integer as value for FLAGTABLE in datafile. And only use values in binary form.

Changed in libecbufr:
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → vanh souvanlasy (vanh-souvanlasy)
Revision history for this message
cpb (chris-beauregard) wrote :

Could also default to binary, but allow a syntax like:

i1101
b01001
o544
x7f

which unambiguously specifies the flag type. The hex representation, in particular, might be useful.

Revision history for this message
Yves Pelletier (yves-pelletier) wrote :

I like Chris' suggestion.

Changed in libecbufr:
status: Confirmed → Fix Committed
Changed in libecbufr:
milestone: none → 0.8.6
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.