Commit 067556d7 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Strip CP437 "graphics" characters in prep_file_desc()

If the extended description is UTF-8, first convert it to CP437.
parent a710f6ff
......@@ -30,6 +30,7 @@
#include "scfglib.h"
#include "sauce.h"
#include "crc32.h"
#include "utf8.h"
/* libarchive: */
#include <archive.h>
......@@ -1082,10 +1083,13 @@ char* prep_file_desc(const char* ext, char* dest)
char* src;
char* buf = strdup(ext);
if(buf == NULL)
src = (char*)ext;
else {
src = buf;
strip_ctrl(src, src);
return NULL;
src = buf;
strip_ctrl(src, src);
if(!str_is_ascii(src)) {
strip_cp437_graphics(src, src);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment