Chromium Code Reviews| Index: base/sys_string_conversions_mac.mm |
| =================================================================== |
| --- base/sys_string_conversions_mac.mm (revision 3750) |
| +++ base/sys_string_conversions_mac.mm (working copy) |
| @@ -61,7 +61,8 @@ |
| return StringType(); |
| out_buffer[elements - 1] = '\0'; |
| - return StringType(&out_buffer[0]); |
| + StringType ret(&out_buffer[0], elements - 1); |
|
Mark Mentovai
2008/10/22 20:02:31
Good catch!
But can't we just do return StringTyp
|
| + return ret; |
| } |
| // Given an STL string |in| with an encoding specified by |in_encoding|, |