src/signs.cpp
changeset 9914 c07d0352d8d5
parent 9734 eb7fab767c8e
child 9959 e2a9b616962a
equal deleted inserted replaced
9913:d9ce89020cc0 9914:c07d0352d8d5
   131 	if (!IsValidSignID(p1)) return CMD_ERROR;
   131 	if (!IsValidSignID(p1)) return CMD_ERROR;
   132 
   132 
   133 	/* If _cmd_text 0 means the new text for the sign is non-empty.
   133 	/* If _cmd_text 0 means the new text for the sign is non-empty.
   134 	 * So rename the sign. If it is empty, it has no name, so delete it */
   134 	 * So rename the sign. If it is empty, it has no name, so delete it */
   135 	if (!StrEmpty(_cmd_text)) {
   135 	if (!StrEmpty(_cmd_text)) {
       
   136 		if (strlen(_cmd_text) >= MAX_LENGTH_SIGN_NAME_BYTES) return CMD_ERROR;
       
   137 
   136 		if (flags & DC_EXEC) {
   138 		if (flags & DC_EXEC) {
   137 			Sign *si = GetSign(p1);
   139 			Sign *si = GetSign(p1);
   138 
   140 
   139 			/* Delete the old name */
   141 			/* Delete the old name */
   140 			free(si->name);
   142 			free(si->name);