Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Run after using DEXTemplate.bt -- too slow to include in every template run, but can be used after running it if wanted
//////////////////////////////////////////////////
// Post template completion checks and functions
//////////////////////////////////////////////////
int CheckSourceFileName(int source_file_index) {
local string temp_str = StringIdRead(source_file_index);
if(sizeof(temp_str) <= 6) {
return -1;
}
temp_str = SubStr(temp_str, sizeof(temp_str) - 7, -1);
return Strcmp(temp_str, ".java\"");
}
if( MessageBox( idYes | idNo,
"Check for oddities?",
"Check for source file issues?")
== idYes ) {
local int class_idx = 0;
for(class_idx = 0; class_idx < sizeof(dex_class_defs) / sizeof(dex_class_defs.class_def); class_idx++) {
if(dex_class_defs.class_def[class_idx].source_file_idx != NO_INDEX && CheckSourceFileName(dex_class_defs.class_def[class_idx].source_file_idx) != 0) {
SPrintf(temp_warning, "Source file name for class [ %s ] does not appear to be a \".java\" file!", LongTypeIdRead(dex_class_defs.class_def[class_idx].class_idx));
PrintWarning(temp_warning);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment