Skip to content

Commit 3a71534

Browse files
committed
[network] fix file getting into wrong directory!
1 parent a09a4ef commit 3a71534

File tree

2 files changed

+6
-35
lines changed

2 files changed

+6
-35
lines changed

common/src/fn_network/network_unit.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,13 @@
1616
*/
1717
uint8_t network_unit(char *devicespec)
1818
{
19-
if (devicespec[0]==0)
20-
return 0;
21-
22-
if (devicespec[1]==':')
19+
if (devicespec[1] == ':')
2320
return 1;
2421

25-
if (devicespec[2]!=':')
26-
return 0;
27-
28-
return devicespec[1];
22+
if (devicespec[2] == ':') {
23+
return devicespec[1] - 0x30;
24+
}
25+
26+
return 1;
2927
}
3028

common/src/network_unit.c

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)