bof_presentation/assets/bof/logic/logic.c

22 lines
319 B
C
Raw Normal View History

2022-09-21 17:54:15 +02:00
#include<stdio.h>
#include<string.h>
void foo(char *input) {
int is_logged_in = 0;
2022-09-28 19:22:48 +02:00
char buf[64];
2022-09-21 17:54:15 +02:00
strcpy(buf, input);
if (is_logged_in) {
puts("logged in!!1!");
} else {
puts("not logged in");
}
}
int main(int argc, char **argv) {
2022-09-28 19:22:48 +02:00
if (argc != 2) {
return 1;
}
2022-09-21 17:54:15 +02:00
foo(argv[1]);
2022-09-28 19:22:48 +02:00
return 0;
2022-09-21 17:54:15 +02:00
}