From 5d588a171571ff8b6c86082b5995c6bbb5bef8ab Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Fri, 11 Sep 2020 18:10:35 -0400 Subject: [PATCH] fixed string cat --- afsk/telem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/afsk/telem.c b/afsk/telem.c index 8ce6ea42..b5d40516 100644 --- a/afsk/telem.c +++ b/afsk/telem.c @@ -258,7 +258,9 @@ int test_i2c_bus(int bus) if (access(busString, W_OK | R_OK) >= 0) { // Test if I2C Bus 0 is present // printf("bus is present\n\n"); char result[128]; - char command[50] = "timeout 10 i2cdetect -y "; + char command_start = "timeout 10 i2cdetect -y "; + char command[50]; + strcpy (command, command_start); strcat (command, busS); // printf("Command: %s \n", command); FILE *i2cdetect = popen(command, "r");