Closed andig closed 5 years ago
Mhhm, actually wrong assessment. It seems that Vr should only be 8 bytes but the buffer contains 9. Seems that's what the device sends or the bytes buffer is reused- didn’t check.
So rather loop across b
which has correct length to ignore trailing 9nth character?
Only today I've stumbled on this excellent codebase after working on mbmd for quite some time. I really love it!
However I've stumbled across a problem. This happens when parsing the address space of a grid inverter like this:
This is inside https://github.com/crabmusket/gosunspec/blob/master/impl/point.go#L487, the panic happens right at the first Common block.
I've added some logging to
Unmarshal
to see what actually goes in (would be nice if a block allowed to "dump" its contents to simplify this):I think
b
should actually be copied frombytes
which is longer thanb
asb
is only initialized with the length of the point and will fail if the string uses all characters of the point: