Diff
checker
Texte
Texte
Images
Documents
Excel
Dossiers
Legal
Enterprise
Application de bureau
Prix
Se connecter
Télécharger Diffchecker Desktop
Comparer le texte
Trouver la différence entre deux fichiers texte
Outils
Historique
Éditeur live
Cacher identiques
Sans retour à la ligne
Vue
Divisé
Unifié
Niveau de précision
Intelligent
Mot
Caractère
Coloration syntaxique
Choisir la syntaxe
Ignorer
Transformer le texte
Aller au premier écart
Modifier l'entrée
Diffchecker Desktop
La façon la plus sécurisée d'utiliser Diffchecker. Obtenez l'application Diffchecker Desktop : vos diffs ne quittent jamais votre ordinateur !
Obtenir Desktop
Untitled diff
Créé
il y a 11 ans
Le diff n'expire jamais
Effacer
Exporter
Partager
Expliquer
14 suppressions
Lignes
Total
Supprimé
Caractères
Total
Supprimé
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
24 lignes
Copier tout
7 ajouts
Lignes
Total
Ajouté
Caractères
Total
Ajouté
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
19 lignes
Copier tout
/* reads ARM9 payload from a given path.
/* reads ARM9 payload from a given path.
filename: full path of payload
filename: full path of payload
returns: 0 on failure, 1 on success */
returns: 0 on failure, 1 on success */
Copier
Copié
Copier
Copié
s32 load_arm9_payload (char *filename) {
s32 load_arm9_payload (char *filename) {
//CHANGE reads payload from RAM instead of SDMC
s32 result = 0;
s32 result = 0;
u32 fsize = 0;
u32 fsize = 0;
Copier
Copié
Copier
Copié
if (!filename)
fsize =
payload_bin_size
;
return result;
g_ext_arm9_size =
payload_bin_
size;
FILE *f = fopen(filename, "rb");
if (f) {
fseek(f , 0, SEEK_END);
fsize =
ftell(f)
;
g_ext_arm9_size =
f
size;
rewind(f);
if (fsize >= 8 && (fsize <= ARM9_PAYLOAD_MAX_SIZE)) {
if (fsize >= 8 && (fsize <= ARM9_PAYLOAD_MAX_SIZE)) {
Copier
Copié
Copier
Copié
u32 bytes_read =
fread(g_ext_arm9_buf, 1,
fsize
, f)
;
memcpy(g_ext_arm9_buf,payload_bin,fsize);
u32 bytes_read =
fsize
;
result = (g_ext_arm9_loaded = (bytes_read == fsize));
result = (g_ext_arm9_loaded = (bytes_read == fsize));
}
}
Copier
Copié
Copier
Copié
fclose(f);
}
return result;
return result;
}
}
Différences enregistrées
Texte d'origine
Ouvrir un fichier
/* reads ARM9 payload from a given path. filename: full path of payload returns: 0 on failure, 1 on success */ s32 load_arm9_payload (char *filename) { s32 result = 0; u32 fsize = 0; if (!filename) return result; FILE *f = fopen(filename, "rb"); if (f) { fseek(f , 0, SEEK_END); fsize = ftell(f); g_ext_arm9_size = fsize; rewind(f); if (fsize >= 8 && (fsize <= ARM9_PAYLOAD_MAX_SIZE)) { u32 bytes_read = fread(g_ext_arm9_buf, 1, fsize, f); result = (g_ext_arm9_loaded = (bytes_read == fsize)); } fclose(f); } return result; }
Texte modifié
Ouvrir un fichier
/* reads ARM9 payload from a given path. filename: full path of payload returns: 0 on failure, 1 on success */ s32 load_arm9_payload (char *filename) { //CHANGE reads payload from RAM instead of SDMC s32 result = 0; u32 fsize = 0; fsize = payload_bin_size; g_ext_arm9_size = payload_bin_size; if (fsize >= 8 && (fsize <= ARM9_PAYLOAD_MAX_SIZE)) { memcpy(g_ext_arm9_buf,payload_bin,fsize); u32 bytes_read = fsize; result = (g_ext_arm9_loaded = (bytes_read == fsize)); } return result; }
Trouver la différence