fix How to convert const char* to char*
-> Use of const_cast<> to strip const
This commit is contained in:
parent
1349de1ba3
commit
fac5131e82
@ -206,7 +206,7 @@ size_t bencode_path2list(const char *pathname, FILE *fp)
|
||||
if( bencode_begin_list(fp) != 1 ) return 0;
|
||||
|
||||
for(; *p;){
|
||||
pn = strchr(p, PATH_SP);
|
||||
pn = const_cast<char *>(strchr(p, PATH_SP));
|
||||
if( pn ){
|
||||
if( bencode_buf(p, pn - p, fp) != 1) return 0;
|
||||
p = pn + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user