1
0
Fork 0
mirror of https://github.com/suchmememanyskill/TegraExplorer.git synced 2024-11-09 13:41:45 +00:00
TegraExplorer/source/utils/utils.c
SuchMemeManySkill 1a931b0256 Add errors
and prepare for file menu more
and fix that you can't go left right when going up down
2020-12-25 00:20:30 +01:00

23 lines
No EOL
459 B
C

#include "utils.h"
#include <string.h>
#include <utils/types.h>
#include <mem/heap.h>
char *CpyStr(const char* in){
int len = strlen(in);
char *out = malloc(len + 1);
out[len] = 0;
memcpy(out, in, len);
return out;
}
void MaskIn(char *mod, u32 bitstream, char mask){
u32 len = strlen(mod);
for (int i = 0; i < len; i++){
if (bitstream & 1)
*mod = mask;
bitstream >>= 1;
mod++;
}
}