summaryrefslogtreecommitdiff
path: root/audio/mp3check/patches/patch-ae
blob: 3e45c2cf9dcb4f340ab03bc63f8f063061972afc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$NetBSD: patch-ae,v 1.3 2007/08/31 10:37:37 drochner Exp $

--- tstring.cc.orig	2006-09-21 23:17:07.000000000 +0200
+++ tstring.cc
@@ -23,6 +23,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include <errno.h>
+#include "config.h"
 #include "tstring.h"
 #include "texception.h"
 
@@ -716,12 +717,12 @@ void tstring::truncate(size_t max) {
 
 void tstring::replaceUnprintable(bool only_ascii) {
    for(size_t i = 0; i < rep->len; i++) {
-      unsigned char& c = (unsigned char &)(*rep)[i];
-      if(!isprint(c)) {
-	 if(c < ' ') {
-	    c = '!';
-	 } else if(only_ascii || (c < 0xa0)) {
-	    c = '?';
+      unsigned char *c = (unsigned char *)&(*rep)[i];
+      if(!isprint(*c)) {
+	 if(*c < ' ') {
+	    *c = '!';
+	 } else if(only_ascii || (*c < 0xa0)) {
+	    *c = '?';
 	 }
       }
    }