diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2020-03-25 20:48:19 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2020-03-25 20:48:19 +0100 |
commit | 1647f4b4f9ebef8b938222b1f48d9a15cc262e97 (patch) | |
tree | 5a62fbb1eae6be5dd47347cc1fdd1630c966f646 /csgo_radar | |
parent | 3c098b80155a4b61134dc3b3de5bdbc08855fc2f (diff) |
clean-up the mess
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'csgo_radar')
-rw-r--r-- | csgo_radar/Makefile | 4 | ||||
-rwxr-xr-x | csgo_radar/main.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/csgo_radar/Makefile b/csgo_radar/Makefile index f569cca..815301e 100644 --- a/csgo_radar/Makefile +++ b/csgo_radar/Makefile @@ -20,3 +20,7 @@ csgo_radar: main.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -lpsapi @echo 'Finished building target: $@' @echo ' ' + + +clean: + rm -f csgo_radar.exe *.o *.d diff --git a/csgo_radar/main.c b/csgo_radar/main.c index 82dbb8b..986783f 100755 --- a/csgo_radar/main.c +++ b/csgo_radar/main.c @@ -435,8 +435,8 @@ static void printPrettyEntityInfo(struct g_entity *ge) wchar_t tm[TEAMLEN+1]; wchar_t wp[WPNLEN+1]; - memset(tm, '\0', TEAMLEN+1); - memset(wp, '\0', WPNLEN+1); + memset(tm, '\0', (TEAMLEN+1) * sizeof(tm[0])); + memset(wp, '\0', WPNLEN+1 * sizeof(wp[0])); switch (ge->p_team) { case TEAM_NONE: @@ -636,7 +636,7 @@ int doHack( DWORD processID ) unsigned int i; DWORD cnt = 0; - memset(sProc, '\0', PROCLEN+1); + memset(sProc, '\0', (PROCLEN+1) * sizeof(sProc[0])); memset(oe, '\0', MAXPLAYER*sizeof(struct off_ent)); memset(ge, '\0', MAXPLAYER*sizeof(struct g_entity)); |