File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 11# pyOCD debugger
22# Copyright (c) 2006-2013,2018-2020 Arm Limited
3+ # Copyright (c) 2020 Koji Kitayama
34# SPDX-License-Identifier: Apache-2.0
45#
56# Licensed under the Apache License, Version 2.0 (the "License");
@@ -312,7 +313,7 @@ def _encode_transfer_data(self):
312313 buf [pos ] = (write_list [write_pos ] >> (8 * 3 )) & 0xff
313314 pos += 1
314315 write_pos += 1
315- return buf
316+ return buf [: pos ]
316317
317318 def _check_response (self , response ):
318319 """! @brief Check the response status byte from CMSIS-DAP transfer commands.
@@ -402,7 +403,7 @@ def _encode_transfer_block_data(self):
402403 buf [pos ] = (write_list [write_pos ] >> (8 * 3 )) & 0xff
403404 pos += 1
404405 write_pos += 1
405- return buf
406+ return buf [: pos ]
406407
407408 def _decode_transfer_block_data (self , data ):
408409 """! @brief Take a byte array and extract the data from it
You can’t perform that action at this time.
0 commit comments