~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_dirname.cc

  • Committer: Brian Aker
  • Date: 2008-12-02 16:33:43 UTC
  • mfrom: (632.1.19 devel)
  • Revision ID: brian@tangent.org-20081202163343-007ifg17p0lvjga7
Merge from Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
  }
150
150
#else
151
151
  /* This is ok even if to == from, becasue we need to cut the string */
152
 
  to= strmake(to, from, (size_t) (from_end-from));
 
152
  size_t len= cmin(strlen(from),(size_t)(from_end-from));
 
153
  to= strncpy(to, from, len);
 
154
  to+= len;
 
155
  to[0]= '\0';
153
156
#endif
154
157
 
155
158
  /* Add FN_LIBCHAR to the end of directory path */