EXC_BAD_ACCESS on NSLog with no string formatting

后端 未结 4 1913
梦如初夏
梦如初夏 2021-02-19 17:56

I\'m getting an EXC_BAD_ACCESS (or a malloc error) on the following line of code:

NSLog(@\"Points:\");  

Which makes zero sense to me, as it

4条回答
  •  礼貌的吻别
    2021-02-19 18:49

    there are % in string, replace % to %%

    NSLog([message stringByReplacingOccurrencesOfString:@"%" withString:@"%%"]);
    

提交回复
热议问题