Fix size calculation and add another test for encoding a gsm7 message
All checks were successful
Run Tests / Test (push) Successful in 16s
Benchmark BufferPool / RunBenchmarks (push) Successful in 21s

This commit is contained in:
2024-07-31 14:19:12 +02:00
parent 85e674753e
commit c56d441891
2 changed files with 38 additions and 20 deletions

View File

@@ -135,7 +135,7 @@ func (p *SUBMIT_SM) Size() int {
}
func (p *SUBMIT_SM) UpdateSize() {
p.header.command_length = uint32(p.Size())
p.sm_length = byte(len(p.short_message))
p.sm_length = byte(p.GetEncoder().EncodesInto(&p.short_message))
}
func (p *SUBMIT_SM) GetEncoder() encoding.Coder {
switch p.data_coding {