Skip to content

Commit

Permalink
fix: Improve data handling when connecting in API class
Browse files Browse the repository at this point in the history
  • Loading branch information
Marius-P1 committed Jun 22, 2024
1 parent 086e0bf commit 62c6989
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ai/src/Network/API.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ def initConnection(self, teamName : str, fileName : str = ""):
data = data.split(' ')
else:
clientNum = received.replace('\n', '')
data = self.receiveData().replace('\n', '').split(' ')
data = self.receiveData()
data = data[0:data.find('\n')].split(' ')

if len(data) != 2:
raise APIException("invalid map size", fileName)
Expand Down

0 comments on commit 62c6989

Please sign in to comment.