Revert "dtc: Consider one-character strings as strings"

This reverts commit 9d7888cbf1.

This commit broke decompilation in certain cases. For example:
   regulator-min-microvolt = <0x00324b00>;
is now decompiled (incorrectly) as:
   regulator-min-microvolt = "\02K";

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
This commit is contained in:
Jonathan Marek 2023-10-22 17:29:22 -04:00
parent 2283dd78ef
commit fcf187a6f2

View file

@ -162,7 +162,7 @@ static enum markertype guess_value_type(struct property *prop)
nnotcelllbl++;
}
if ((p[len-1] == '\0') && (nnotstring == 0) && (nnul <= (len-nnul))
if ((p[len-1] == '\0') && (nnotstring == 0) && (nnul < (len-nnul))
&& (nnotstringlbl == 0)) {
return TYPE_STRING;
} else if (((len % sizeof(cell_t)) == 0) && (nnotcelllbl == 0)) {